1def get_permissions(self):
2 # Your logic should be all here
3 if self.request.method == 'GET':
4 self.permission_classes = [DummyPermission, ]
5 else:
6 self.permission_classes = [IsAuthenticated, ]
7
8 return super(UsersViewSet, self).get_permissions()
9