Skip to content

Commit

Permalink
change permission
Browse files Browse the repository at this point in the history
  • Loading branch information
Nvnastya committed Dec 9, 2024
1 parent c127a21 commit 853f2f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django/tamprog/user/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from rest_framework_simplejwt.tokens import RefreshToken
from rest_framework.response import Response
from rest_framework.views import APIView
from rest_framework.permissions import AllowAny, IsAdminUser, IsAuthenticated
from rest_framework.permissions import AllowAny, IsAdminUser, IsAuthenticated, IsAuthenticatedOrReadOnly
from .services import *
from django.contrib.auth import get_user_model
from logging import getLogger
Expand Down Expand Up @@ -241,7 +241,7 @@ def PersonParameters(required=False):
class PersonViewSet(viewsets.ModelViewSet):
queryset = Person.objects.all()
serializer_class = PersonSerializer
permission_classes = [IsAdminUser, NoPostAllowed]
permission_classes = [IsAuthenticatedOrReadOnly]

@extend_schema(
summary='Get all users',
Expand Down

0 comments on commit 853f2f1

Please sign in to comment.