Skip to content

Commit

Permalink
feat: purge AdminModelViewSet
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed-Hacene committed Mar 20, 2024
1 parent ba0f2c7 commit 904ebc2
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions backend/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,6 @@ def object(self, request, pk):
return Response(serializer_class(super().get_object()).data)


class AdminModelViewSet(BaseModelViewSet):
"""
ModelViewSet for models whose CRUD operations can only be carried out by users with administrator role
"""

permission_classes = [IsAdministrator]


# Risk Assessment


Expand Down Expand Up @@ -855,7 +847,7 @@ class UserGroupViewSet(BaseModelViewSet):
filterset_fields = ["folder"]


class RoleViewSet(AdminModelViewSet):
class RoleViewSet(BaseModelViewSet):
"""
API endpoint that allows roles to be viewed or edited
"""
Expand All @@ -865,7 +857,7 @@ class RoleViewSet(AdminModelViewSet):
ordering_fields = ordering


class RoleAssignmentViewSet(AdminModelViewSet):
class RoleAssignmentViewSet(BaseModelViewSet):
"""
API endpoint that allows role assignments to be viewed or edited.
"""
Expand Down

0 comments on commit 904ebc2

Please sign in to comment.