Set DRF permission_classes and filter_backends globally#309
Merged
brianhelba merged 2 commits intomasterfrom Mar 5, 2026
Merged
Set DRF permission_classes and filter_backends globally#309brianhelba merged 2 commits intomasterfrom
permission_classes and filter_backends globally#309brianhelba merged 2 commits intomasterfrom
Conversation
Deploying geodatalytics with
|
| Latest commit: |
c9b105c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://853b70bf.geodatalytics.pages.dev |
| Branch Preview URL: | https://drf-override.geodatalytics.pages.dev |
Collaborator
Author
|
@annehaley Ready for review. |
Open
annehaley
reviewed
Mar 3, 2026
Move the de facto `GuardianPermission` and `GuardianFilter` defaults up to actual DRF defaults. This eliminates boilerplate and ensures that new `ViewSets` will automatically inherit the correct access control. Note, `DatasetViewSet` and `UserViewSet` have exceptional overrides, to preserve their existing behavior.
Collaborator
|
Strangely it looks like the test failures won't render properly for me on GH. I was able to run the tests locally (there was a lot of printout, so maybe it was too long for GH to handle). It appears to be an import error: |
Collaborator
Author
|
I added one more commit to move |
annehaley
approved these changes
Mar 5, 2026
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.
Move the de facto
GuardianPermissionandGuardianFilterdefaults up to actual DRF defaults. This eliminates boilerplate and ensures that newViewSetswill automatically inherit the correct access control.Note,
DatasetViewSetandUserViewSethave exceptional overrides, to preserve their existing behavior.