api.permissions
Module Contents
Classes
Object-level permission to only allow read-only operations. |
Functions
|
Check if a user is an admin of a project. |
- class api.permissions.IsReadOnly
Bases:
rest_framework.permissions.BasePermissionObject-level permission to only allow read-only operations.
- has_permission(request, view)
- api.permissions.is_project_admin(user, project)
Check if a user is an admin of a project. A user is a project admin if: 1. They are a member of the project, OR 2. They are an administrator of the project’s group (if the project has a group) 3. They are a superuser/staff