def get_permissions(self): super().set_request_data(self.request) factory = PermissionFactory(self.request) if self.action in ['retrieve', 'update', 'partial_update']: permission_classes = factory.get_general_permissions([ValidateOrgMatchesUser]) else: permission_classes = factory.base_sa_permissions return [permission() for permission in permission_classes]
def get_permissions(self): super().set_request_data(self.request) factory = PermissionFactory(self.request) if self.action in ['create', 'retrieve', 'list']: permission_classes = factory.get_general_permissions( [UserHasSameOrg, IsHigherInOrganization]) elif self.action in ['partial_update']: permission_classes = factory.get_general_permissions( [IsHigherInOrganization, CanUpdateKeys]) else: permission_classes = factory.get_general_permissions([]) return [permission() for permission in permission_classes]
def get_permissions(self): super().set_request_data(self.request) factory = PermissionFactory(self.request) permission_classes = factory.get_general_permissions([]) return [permission() for permission in permission_classes]
def get_permissions(self): permission_classes = PermissionFactory(self.request).get_general_permissions([]) return [permission() for permission in permission_classes]
def get_permissions(self): super().set_request_data(self.request) factory = PermissionFactory(self.request) permission_classes = factory.base_sa_permissions return [permission() for permission in permission_classes]
def get_permissions(self): super().set_request_data(self.request) factory = PermissionFactory(self.request) permission_classes = factory.get_general_permissions( [CheckTemplateOrganizationById]) return [permission() for permission in permission_classes]