permissions.py 323 B

1234567891011
  1. from projects.permissions import ProjectPermission
  2. class ProjectAlertPermission(ProjectPermission):
  3. scope_map = {
  4. **ProjectPermission.scope_map,
  5. "PATCH": ["project:write", "project:admin"],
  6. }
  7. def get_user_scopes(self, obj, user):
  8. return obj.project.organization.get_user_scopes(user)