ReST Framwork Permissions

Permissions are used to check whether a particular user can see an object or write to a namespace. Fleeting Form’s API permissions are implemented using the ReST Framework’s permissions, so have a look there for more background.

class fleetingform.permissions.FleetingFormHardLimitPermission[source]

Bases: rest_framework.permissions.BasePermission

Do not allow creates for users over their hard limit.

has_permission(request, view)[source]

Return True if permission is granted, False otherwise.

message = 'Namespace hard limit exceeded.'
class fleetingform.permissions.FleetingFormTokenPermission[source]

Bases: rest_framework.permissions.BasePermission

Require the presence of the correct namespace token.

has_object_permission(request, view, obj)[source]

Return True if permission is granted, False otherwise.

has_permission(request, view)[source]

Return True if permission is granted, False otherwise.

message = 'A valid token and namespace are required.'
class fleetingform.permissions.FleetingNamespaceTokenPermission[source]

Bases: rest_framework.permissions.BasePermission

Require the presence of the correct namespace token or user token.

has_object_permission(request, view, obj)[source]

Return True if permission is granted, False otherwise.

has_permission(request, view)[source]

Users can create new namespaces, namespace tokens cannot. Users and namespace tokens can both list.

message = 'A valid token is required.'