Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ don't show scopes from notifications.api in the ref page #28

Merged
merged 1 commit into from
May 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions vng_api_common/notifications/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ class NotificationBaseView(APIView):
swagger_schema = None

permission_classes = (AuthScopesRequired,)
required_scopes = Scope(
SCOPE_NOTIFICATIES_PUBLICEREN_LABEL
) # FIXME: this should be standalone!
required_scopes = Scope(SCOPE_NOTIFICATIES_PUBLICEREN_LABEL, private=True)

def get_serializer(self, *args, **kwargs):
return NotificatieSerializer(*args, **kwargs)
Expand Down Expand Up @@ -55,7 +53,9 @@ def handle_notification(self, message):
class NotificationView(NotificationBaseView):
action = "create"
permission_classes = (AuthScopesRequired,)
required_scopes = {"create": Scope(SCOPE_NOTIFICATIES_PUBLICEREN_LABEL)}
required_scopes = {
"create": Scope(SCOPE_NOTIFICATIES_PUBLICEREN_LABEL, private=True)
}

def create(self, request, *args, **kwargs):
return self.post(request, *args, **kwargs)
Expand Down
Loading