Skip to content

Commit

Permalink
Add AllowAny permission to volunteers and organizers
Browse files Browse the repository at this point in the history
  • Loading branch information
1yunker committed Nov 8, 2023
1 parent c6621a8 commit 02f25aa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions backend/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from rest_framework import filters, generics, mixins, status, viewsets
from rest_framework.decorators import action
from rest_framework.exceptions import PermissionDenied
from rest_framework.permissions import SAFE_METHODS
from rest_framework.permissions import AllowAny, SAFE_METHODS
from rest_framework.response import Response
from taggit.models import Tag

Expand Down Expand Up @@ -64,6 +64,7 @@
VolunteerGetSerializer,
VolunteerUpdateSerializer,
)
from backend.api import permissions

# from taggit.serializers import TaggitSerializer

Expand Down Expand Up @@ -231,7 +232,7 @@ class VolunteerViewSet(DestroyUserMixin, viewsets.ModelViewSet):
Позволяет получать, создавать, редактировать, удалять участника-волонтера.
"""

permission_classes = (AllowAny,)
queryset = Volunteer.objects.all()

def get_serializer_class(self):
Expand All @@ -249,7 +250,7 @@ class OrganizationViewSet(DestroyUserMixin, viewsets.ModelViewSet):
Позволяет получать, создавать, редактировать,
удалять организацию-организатора проекта.
"""

permission_classes = (AllowAny,)
queryset = Organization.objects.all()

def get_serializer_class(self):
Expand Down

0 comments on commit 02f25aa

Please sign in to comment.