feat: enable authz for projects and datasets lists#573
Open
v-rocheleau wants to merge 5 commits intodevelopfrom
Open
feat: enable authz for projects and datasets lists#573v-rocheleau wants to merge 5 commits intodevelopfrom
v-rocheleau wants to merge 5 commits intodevelopfrom
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:
|
davidlougheed
requested changes
Apr 2, 2025
| return await sync_to_async(super().destroy)(request, *args, **kwargs) | ||
|
|
||
| @async_to_sync | ||
| async def list(self, request, *args, **kwargs): |
Member
There was a problem hiding this comment.
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 |
Member
There was a problem hiding this comment.
use from django.conf import settings and access all Django settings thru that interface
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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