def get_permissions(self): if self.action == "retrieve": return [permissions.IsAuthenticated()] elif self.action == "create": return [IsSuperUser()] elif self.action == "list": return [permissions.IsAuthenticated()] elif self.action == "update": return [IsSuperUser(),permissions.IsAdminUser()] elif self.action == "partial_update": return [IsSuperUser(),permissions.IsAdminUser()] elif self.action == "destroy": return [IsSuperUser()] else: return [permissions.IsAuthenticated()]
def get_permissions(self): if self.action == "retrieve": return [IsAuthenticated(),IsTicketOwnerOrReadOnly()] elif self.action == "create": return [IsSuperUser()] elif self.action == "list": return [IsAuthenticated(),IsTicketOwnerOrReadOnly()] elif self.action == "update": return [IsTicketOwnerOrReadOnly()] elif self.action == "partial_update": return [IsTicketOwnerOrReadOnly()] elif self.action == "destroy": return [IsSuperUser()] else: return [IsAuthenticated(),IsTicketOwnerOrReadOnly()]
def get_permissions(self): return [IsSuperUser(),permissions.IsAdminUser()]
def get_permissions(self): return [IsSuperUser(),]