new AccessRequest(property, accessType, permission, methodNames, registry) → {AccessRequest}
A request to access protected resources.
The method can either be called with the following signature or with a single
argument: an AccessRequest instance or an object containing all the required properties.
Parameters:
Name | Type | Description |
---|---|---|
property |
String | The property/method/relation name |
accessType |
String | The access type |
permission |
String | The requested permission |
methodNames |
Array.<String> | The names of involved methods |
registry |
Registry | The application or global registry |
- Source:
Returns:
- Type
- AccessRequest
Methods
exactlyMatches(acl)
Does the given `ACL` apply to this `AccessRequest`.
Parameters:
Name | Type | Description |
---|---|---|
acl |
ACL |
- Source:
isAllowed() → {Boolean}
Is the request for access allowed?
- Source:
Returns:
- Type
- Boolean
isWildcard() → {Boolean}
Does the request contain any wildcards?
- Source:
Returns:
- Type
- Boolean
settleDefaultPermission(defaultPermission)
Settle the accessRequest's permission if DEFAULT
In most situations, the default permission can be resolved from the nested model
config. An default permission can also be explicitly provided to override it or
cope with AccessRequest instances without a nested model (e.g. model is '*')
Parameters:
Name | Type | Description |
---|---|---|
defaultPermission |
String | (optional) the default permission to apply |
- Source: