permissions.py 428 B

123456789101112
  1. from organizations_ext.permissions import OrganizationPermission
  2. from projects.permissions import ProjectPermission
  3. class EnvironmentPermission(OrganizationPermission):
  4. def get_user_scopes(self, obj, user):
  5. return obj.organization.get_user_scopes(user)
  6. class EnvironmentProjectPermission(ProjectPermission):
  7. def get_user_scopes(self, obj, user):
  8. return obj.project.organization.get_user_scopes(user)