Skip to content

Commit

Permalink
hotfix turn off permissions for taks
Browse files Browse the repository at this point in the history
  • Loading branch information
Reagent992 committed Feb 5, 2024
1 parent 13ef7d9 commit c88d6e9
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions api/v1/views/task_views.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from django.contrib.auth import get_user_model
from drf_spectacular.utils import extend_schema, extend_schema_view
from rest_framework import permissions, viewsets
from rest_framework import viewsets

from api.v1.permissions import TeamBossPermission
from api.v1.serializers.api.task_serializer import (
TaskSerializer,
TaskSerializerPost,
Expand Down Expand Up @@ -54,8 +53,3 @@ def get_serializer_class(self):

def perform_create(self, serializer):
serializer.save(creator=self.request.user)

def get_permissions(self):
if self.request.method not in permissions.SAFE_METHODS:
self.permission_classes = [TeamBossPermission]
return super(TaskViewSet, self).get_permissions()

0 comments on commit c88d6e9

Please sign in to comment.