NodePermissions¶
Canonical path: o6.server.NodePermissions
Root shortcut: o6.NodePermissions
NodePermissions
¶
The RolePermissions of one node, reached as node._permissions.
The leading underscore is part of the name: unprefixed attribute access on a
node handle browses to child nodes, so node.permissions = ... would
silently create an ordinary Python attribute and change nothing.
Assigning a mapping to node._permissions is shorthand for
set. Every operation here takes
recursive=True to apply to the whole subtree, and each raises
StatusCodeError if the node is gone.
See Role-based access control.
Functions¶
__init__
¶
get
¶
Return the permissions set explicitly on this node.
Namespace defaults are not included, so an empty result means the node falls back to its namespace default.
set
¶
Replace this node's permissions with the given mapping.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
permissions
|
Mapping[Role | NodeId, Permission]
|
Role to |
required |
recursive
|
bool
|
Apply to this node's whole subtree. |
False
|
grant
¶
Add permissions for one role, keeping the other roles' entries.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
role
|
Role | NodeId
|
The role to grant to. |
required |
permissions
|
Permission
|
The |
required |
overwrite
|
bool
|
Replace the role's existing mask instead of adding to it. |
False
|
recursive
|
bool
|
Apply to this node's whole subtree. |
False
|
revoke
¶
Remove permissions from one role, keeping its remaining bits.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
role
|
Role | NodeId
|
The role to revoke from. |
required |
permissions
|
Permission
|
The |
required |
recursive
|
bool
|
Apply to this node's whole subtree. |
False
|