Skip to content

ObjectPermissions

Overview

Extends DjangoObjectPermissions to support state permissions and CRUDL naming conventions. It sets the 'view_action' in permission checks to determine required permissions for views and objects based on the current action in the view.

_has_later_permission_decision

Return whether this action has a guaranteed state-aware decision after model scope.

Signature

_has_later_permission_decision(self, view)

Parameters

NameTypeRequiredDescription
selfyes
viewyes

Returns

<class 'bool'>

Source

server/vueda/core/permissions.py:78

get_required_object_permissions

Allow dynamic permissions based on the view action, for callables in perms_map, for object permissions.

Signature

get_required_object_permissions(self, method, model_cls)

Parameters

NameTypeRequiredDescription
selfyes
methodyes
model_clsyes

Returns

list[str]

Source

server/vueda/core/permissions.py:121

get_required_permissions

Allow dynamic permissions based on the view action, for callables in perms_map.

Signature

get_required_permissions(self, method, model_cls)

Parameters

NameTypeRequiredDescription
selfyes
methodyes
model_clsyes

Returns

list[str]

Source

server/vueda/core/permissions.py:109

has_object_permission

Records the current view action then delegates to DjangoObjectPermissions.

Signature

has_object_permission(self, request, view, obj)

Parameters

NameTypeRequiredDescription
selfyes
requestyes
viewyes
objyes

Returns

<class 'bool'>

Source

server/vueda/core/permissions.py:103

has_permission

Defer a model-level denial only when a matching state grant can be decided later.

Object-scoped actions defer to has_object_permission. Framework list actions defer to their workflow-aware queryset filter. Collection writes, including create, retain the model-level result because no existing object supplies a workflow state.

Signature

has_permission(self, request, view)

Parameters

NameTypeRequiredDescription
selfyes
requestyes
viewyes

Returns

<class 'bool'>

Source

server/vueda/core/permissions.py:87

object_permission_actions

perms_map

view_action

Source

server/vueda/core/permissions.py:59

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2