Skip to content
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

Create permissions service layer #2115

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Conversation

jjnesbitt
Copy link
Member

The goal of this PR is to abstract most of the use of django-guardian into the permissions service layer, instead exposing functions that achieve the same effect. This has the following benefits:

  1. Consolidates permission logic in the application, most notably used in endpoints.
  2. Allows for easier modification or extension of our permissions logic.

One notable use case for this is forks of the codebase that may need to modify how permissions are done (e.g. LINC). This refactor and consolidation makes that much easier, as everything can be easily found in one file. cc @aaronkanzer.

dandiapi/api/models/dandiset.py Outdated Show resolved Hide resolved
dandiapi/api/services/permissions/dandiset.py Outdated Show resolved Hide resolved
dandiapi/api/services/permissions/dandiset.py Show resolved Hide resolved
dandiapi/api/views/asset.py Show resolved Hide resolved
dandiapi/api/services/permissions/dandiset.py Show resolved Hide resolved
@jjnesbitt jjnesbitt added patch Increment the patch version when merged release Create a release when this pr is merged labels Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged release Create a release when this pr is merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants