Methods
DeniesDecisionFn(arg) → {boolean}
Returns whether the given action is explicitly denied from the given principal with respect to the given securable and given optional data.
Parameters:
| Name | Type | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
arg |
Object | The argument to be deconstructed. Properties
|
Returns:
Whether arg.principal is denied the arg.action with respect to the arg.securable given arg.data.
- Type
- boolean
grants()
- Deprecated:
- use `permits()`
- Source:
- See:
-
- StaticAccessControlStrategy#permits
MultiDeniesDecisionFn(arg, actions, securable, dataopt) → {boolean}
Returns whether any of the given principals are explicitly denied any of the given actions against the given securable.
Parameters:
| Name | Type | Attributes | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
arg |
Object | The argument to be deconstructed. Properties
|
|||||||
actions |
Array.<any> | The actions which may be denied from any of the |
|||||||
securable |
any | The thing access to which is being controlled. |
|||||||
data |
any |
<optional> |
Any contextual information needed for the access control decision; passed into each ACE's |
Returns:
Whether any of the arg.principals are denied any of the arg.actions`.
- Type
- boolean
MultiPermitsDecisionFn(arg, actions, securable, dataopt) → {boolean}
Returns whether all of the given actions are permitted amongst the given principals with respect to the given securable, and none of the principals are explicitly denied any of the actions.
Parameters:
| Name | Type | Attributes | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
arg |
Object | The argument to be deconstructed. Properties
|
|||||||
actions |
Array.<any> | The actions none of which must be denied from any of the |
|||||||
securable |
any | The thing access to which is being controlled. |
|||||||
data |
any |
<optional> |
Any contextual information needed for the access control decision; passed into each ACE's |
Returns:
Whether the arg.principals are collectively permitted and none of which are explicitly denied.
- Type
- boolean
permits()
- Since:
- 1.3.0
- Source:
PermitsDecisionFn(arg) → {boolean}
Returns whether the given principal is permitted to take the given action with respect to the given securable, and that the principal is not explicitly denied the action, given optional data.
Parameters:
| Name | Type | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
arg |
Object | The argument to be deconstructed. Properties
|
Returns:
Whether arg.principal is permitted to take the arg.action with respect to the arg.securable given arg.data.
- Type
- boolean
SamenessTesterFn(that, other) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
that |
Something being tested for sameness as {@param other}. |
|
other |
Something being tests for sameness as {@param that}. |
- Source:
Returns:
Whether the two things are considered to be the same.
- Type
- boolean
Type Definitions
AccessControlStrategy
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
permits |
PermitsDecisionFn | |
denies |
DeniesDecisionFn |
AccessControlTuple
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
principal |
any | The principal. |
|
action |
any | The action. |
|
securable |
any | The securable. |
|
data |
any |
<optional> |
Optional contextual data. |