iangow / se_features

Linguistic features derived from StreetEvents
1 stars 3 forks source link

Give Maliha the access to `ner_class_alt_7` #25

Closed Yvonne-Han closed 4 years ago

Yvonne-Han commented 4 years ago

@MalihaChowdhury said that she couldn't access ner_class_alt_7. I'm trying to fix this.

Yvonne-Han commented 4 years ago
Yvonne-Han commented 4 years ago

@MalihaChowdhury can access other tables (e.g., word_counts) in se_features so she should have access to the se_features schema.

Yvonne-Han commented 4 years ago

I checked my NER code and it seems that I did run the ALTER TABLE OWNER SQL here.

Yvonne-Han commented 4 years ago

By checking in PgAdmin4, I can see that @MalihaChowdhury’s role = the group unimelb. And the unimelb group has a bunch of roles including se_features_access INSTEAD OF se_features. This might be the reason why she can't access the table.

Yvonne-Han commented 4 years ago

I just ran the following PSQL command in terminal and waiting for Maliha to check whether she has access now.

crsp=> GRANT ALL ON se_features.ner_class_alt_7 TO se_features_access;
GRANT
Yvonne-Han commented 4 years ago

OK. She can now access ner_class_alt_7 so I guess the problem is solved.

@iangow I've made a tweak to the original code here and it should be able to solve the issue (You can close this issue off once you confirmed that little tweak). Do we also need to apply the same change to the code for creating other se_features tables?

iangow commented 4 years ago

@Yvonne-Han

It should be GRANT SELECT not GRANT ALL. The idea is that the _access role has read-only rights.

Run the following and tweak the code:

REVOKE ALL ON se_features.ner_class_alt_7 FROM se_features_access;
GRANT SELECT ON se_features.ner_class_alt_7 TO se_features_access;
Yvonne-Han commented 4 years ago

@Yvonne-Han

It should be GRANT SELECT not GRANT ALL. The idea is that the _access role has read-only rights.

Run the following and tweak the code:

REVOKE ALL ON se_features.ner_class_alt_7 FROM se_features_access;
GRANT SELECT ON se_features.ner_class_alt_7 TO se_features_access;

@iangow I see. Done! You want me to tweak those other files (e.g., when creating tables for tone_measure, word_counts, etc.)?

iangow commented 4 years ago

You want me to tweak those other files (e.g., when creating tables for tone_measure, word_counts, etc.)?

Sure. Perhaps create an issue with a list of tables to be adjusted.

Yvonne-Han commented 4 years ago

You want me to tweak those other files (e.g., when creating tables for tone_measure, word_counts, etc.)?

Sure. Perhaps create an issue with a list of tables to be adjusted.

Well, I double-checked every folder in se_features and it seems that you updated all of them 11 months ago. All good then. I will close this issue.