Global access rights API
Methods
(static) checkOperation(operationType, contextopt) → {boolean}
Check access right
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
operationType | string | List of possible operation types and relevant keys of the context object:
| |||||||||||||||||||||||||||||||||||||||||
context | object | <optional> | Object containing additional access context. See the operationType parameter for possible property names. Properties
|
- Since
- 5.4.0
Unknown operation type
Context is missing
The decision as boolean
- Type:
- boolean
(static) filterElements(elements, operationType, contextopt, decisionopt) → {Array.<$k.SemanticElement>}
Filter semantic elements in array with access rights
Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
elements | Array.<$k.SemanticElement> | |||||||||||||||||||||||||||||||||||||||||||
operationType | string | List of possible operation types and relevant keys of the context object:
| ||||||||||||||||||||||||||||||||||||||||||
context | object | <optional> | Object containing additional access context. See the operationType parameter for possible property names. Properties
| |||||||||||||||||||||||||||||||||||||||||
decision | boolean | <optional> | true | true to filter out elements that fail the rights check, false to filter out elements that pass the rights check. |
- Since
- 5.4.0
Unknown operation type
Only semantic elements in array can be processed
Returns the filtered semantic elements
- Type:
- Array.<$k.SemanticElement>
(static) getDecision(operationType, contextopt) → {$k.Decision}
Get access right decision
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
operationType | string | List of possible operation types and relevant keys of the context object:
| |||||||||||||||||||||||||||||||||||||||||
context | object | <optional> | Object containing additional access context. See the operationType parameter for possible property names. Properties
|
- Since
- 5.4.0
Unknown operation type
Context is missing
The decision
- Type:
- $k.
Decision