diff --git a/engine/apps/api/views/team.py b/engine/apps/api/views/team.py index 84b84203..a7395483 100644 --- a/engine/apps/api/views/team.py +++ b/engine/apps/api/views/team.py @@ -2,6 +2,7 @@ from rest_framework import mixins, viewsets from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response +from apps.api.permissions import RBACPermission from apps.api.serializers.team import TeamSerializer from apps.auth_token.auth import PluginAuthentication from apps.mobile_app.auth import MobileAppAuthTokenAuthentication @@ -14,7 +15,12 @@ class TeamViewSet(PublicPrimaryKeyMixin, mixins.ListModelMixin, mixins.UpdateMod MobileAppAuthTokenAuthentication, PluginAuthentication, ) - permission_classes = (IsAuthenticated,) + permission_classes = (IsAuthenticated, RBACPermission) + rbac_permissions = { + "list": [RBACPermission.Permissions.OTHER_SETTINGS_READ], + "retrieve": [RBACPermission.Permissions.OTHER_SETTINGS_READ], + "update": [RBACPermission.Permissions.OTHER_SETTINGS_WRITE], + } serializer_class = TeamSerializer