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