fix: removing permissions from user notifications
This commit is contained in:
parent
9f20936c86
commit
460003c7f5
1 changed files with 2 additions and 9 deletions
|
|
@ -195,7 +195,8 @@ class NotificationViewSet(BaseViewSet, BasePaginator):
|
|||
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
@allow_permission(
|
||||
allowed_roles=[ROLE.ADMIN, ROLE.MEMBER, ROLE.VIEWER, ROLE.GUEST], level="WORKSPACE"
|
||||
allowed_roles=[ROLE.ADMIN, ROLE.MEMBER, ROLE.VIEWER, ROLE.GUEST],
|
||||
level="WORKSPACE",
|
||||
)
|
||||
def mark_read(self, request, slug, pk):
|
||||
notification = Notification.objects.get(
|
||||
|
|
@ -244,7 +245,6 @@ class NotificationViewSet(BaseViewSet, BasePaginator):
|
|||
|
||||
|
||||
class UnreadNotificationEndpoint(BaseAPIView):
|
||||
|
||||
@allow_permission(
|
||||
allowed_roles=[ROLE.ADMIN, ROLE.MEMBER, ROLE.VIEWER, ROLE.GUEST],
|
||||
level="WORKSPACE",
|
||||
|
|
@ -286,7 +286,6 @@ class UnreadNotificationEndpoint(BaseAPIView):
|
|||
|
||||
|
||||
class MarkAllReadNotificationViewSet(BaseViewSet):
|
||||
|
||||
@allow_permission(
|
||||
allowed_roles=[ROLE.ADMIN, ROLE.MEMBER], level="WORKSPACE"
|
||||
)
|
||||
|
|
@ -373,9 +372,6 @@ class UserNotificationPreferenceEndpoint(BaseAPIView):
|
|||
serializer_class = UserNotificationPreferenceSerializer
|
||||
|
||||
# request the object
|
||||
@allow_permission(
|
||||
allowed_roles=[ROLE.ADMIN, ROLE.MEMBER, ROLE.GUEST], level="WORKSPACE"
|
||||
)
|
||||
def get(self, request):
|
||||
user_notification_preference = UserNotificationPreference.objects.get(
|
||||
user=request.user
|
||||
|
|
@ -386,9 +382,6 @@ class UserNotificationPreferenceEndpoint(BaseAPIView):
|
|||
return Response(serializer.data, status=status.HTTP_200_OK)
|
||||
|
||||
# update the object
|
||||
@allow_permission(
|
||||
allowed_roles=[ROLE.ADMIN, ROLE.MEMBER, ROLE.GUEST], level="WORKSPACE"
|
||||
)
|
||||
def patch(self, request):
|
||||
user_notification_preference = UserNotificationPreference.objects.get(
|
||||
user=request.user
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue