added permission classes

This commit is contained in:
Daniele Scasciafratte 2022-05-04 18:51:02 +02:00 committed by GitHub
parent a50ef874cd
commit 67949e83f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,3 +31,4 @@ class TicketViewSet(viewsets.ModelViewSet):
class CreateUserView(CreateModelMixin, GenericViewSet): class CreateUserView(CreateModelMixin, GenericViewSet):
queryset = get_user_model().objects.all() queryset = get_user_model().objects.all()
serializer_class = UserSerializer serializer_class = UserSerializer
permission_classes = [IsAdminUser]