beat.web.common.permissions module

class beat.web.common.permissions.IsSuperuser[source]

Bases: rest_framework.permissions.BasePermission

Global permission check for super user

has_permission(request, view)[source]

Return True if permission is granted, False otherwise.

class beat.web.common.permissions.IsAuthor[source]

Bases: rest_framework.permissions.IsAuthenticated

Global permission check that verify if the user is also the onwer of the asked data

has_permission(request, view)[source]

Return True if permission is granted, False otherwise.

class beat.web.common.permissions.IsAuthorOrReadOnly[source]

Bases: beat.web.common.permissions.IsAuthor

Either allow access if using a read method or check that the user is also the author.

has_permission(request, view)[source]

Return True if permission is granted, False otherwise.

class beat.web.common.permissions.IsAdminOrReadOnly[source]

Bases: rest_framework.permissions.IsAdminUser

Either allow access if using a read method or check that the user is an admin.

has_permission(request, view)[source]

Return True if permission is granted, False otherwise.

class beat.web.common.permissions.IsModifiableOrRead[source]

Bases: rest_framework.permissions.BasePermission

Check for modifiable flag if there’s a modification that is tried

has_object_permission(request, view, obj)[source]

Return True if permission is granted, False otherwise.