OAuthTokenHasReadWriteScope

Qualified name: intranet.apps.auth.rest\_permissions.OAuthTokenHasReadWriteScope

class intranet.apps.auth.rest_permissions.OAuthTokenHasReadWriteScope[source]

Bases: TokenHasReadWriteScope

Requires the “read” scope for safe methods and the “write” scope for all other methods when the request is authenticated with an OAuth token. Requests that are not authenticated with an OAuth token (e.g. session authentication) are not affected.

This must be included in the permission_classes of every API view that is not public.

Methods

has_permission