-
Notifications
You must be signed in to change notification settings - Fork 0
feat: project/dataset view permissions #255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #255 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 56 56
Lines 1731 1733 +2
Branches 177 177
=========================================
+ Hits 1731 1733 +2
🚀 New features to boost your workflow:
|
davidlougheed
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first pass
| ) | ||
| P_QUERY_DATASET_LEVEL_COUNTS = Permission(QUERY_VERB, DATASET_LEVEL_COUNTS, gives=(P_QUERY_DATASET_LEVEL_BOOLEAN,)) | ||
|
|
||
| # Data catalog: permissions to view project/dataset metadata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd move these above the query permissions so those can all be grouped together
bento_lib/auth/permissions.py
Outdated
| P_QUERY_DATASET_LEVEL_COUNTS = Permission(QUERY_VERB, DATASET_LEVEL_COUNTS, gives=(P_QUERY_DATASET_LEVEL_BOOLEAN,)) | ||
|
|
||
| # Data catalog: permissions to view project/dataset metadata | ||
| P_VIEW_DATASETS = Permission(VIEW_VERB, DATASET, min_level_required=LEVEL_INSTANCE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should give view:projects imo, since a dataset without a project isn't very useful. unless there's a reason not to?
|
|
||
| # Data catalog: permissions to view project/dataset metadata | ||
| P_VIEW_DATASETS = Permission(VIEW_VERB, DATASET) | ||
| P_VIEW_PROJECTS = Permission(VIEW_VERB, PROJECT, min_level_required=LEVEL_PROJECT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add supports_data_type_narrowing=False to these
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(although I should rethink how this logic works, should be false by default I think)
Intended for data catalog, for situations where listing the metadata of projects/datasets must be authorized.
Accompanying Katsu/Bento PRs will:
BENTO_KATSU_PUBLIC_PROJECTS_AUTHZBENTO_KATSU_PUBLIC_DATASETS_AUTHZ/projectsand/datasetsendpoints authz protected based on the feature flags