-
Notifications
You must be signed in to change notification settings - Fork 6
feat: enable authz for projects and datasets lists #573
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: develop
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #573 +/- ##
===========================================
- Coverage 92.91% 92.83% -0.08%
===========================================
Files 124 124
Lines 4486 4496 +10
Branches 391 393 +2
===========================================
+ Hits 4168 4174 +6
- Misses 228 230 +2
- Partials 90 92 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| return await sync_to_async(super().destroy)(request, *args, **kwargs) | ||
|
|
||
| @async_to_sync | ||
| async def list(self, request, *args, **kwargs): |
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.
there are a few more endpoints for viewing project/dataset metadata (a bunch of public endpoints + maybe some old CHORD endpoints too), I think. Also, how will this interface with Beacon?
| from chord_metadata_service.authz.middleware import authz_middleware as authz | ||
| from chord_metadata_service.authz.permissions import BentoAllowAnyReadOnly, BentoDeferToHandler | ||
| from chord_metadata_service.cleanup.run_all import run_all_cleanup | ||
| from chord_metadata_service.metadata.settings import KATSU_DATASETS_LIST_AUTHZ, KATSU_PROJECTS_LIST_AUTHZ |
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.
use from django.conf import settings and access all Django settings thru that interface
Enables optional authorization checks for project and dataset models, mostly intended for the data catalog.
GET /projectsP_VIEW_PROJECTSpermissionKATSU_PROJECTS_LIST_AUTHZ: boolGET /datasetsP_VIEW_DATASETSpermissionKATSU_DATASETS_LIST_AUTHZ: bool