Class: Acl

Acl()

Access control list

Constructor

new Acl()

Source:

Methods

denies(arg) → {boolean}

Returns whether any of the given principals are explicitly denied any of the given actions against the given securable.

Parameters:
Name Type Description
arg Object

The argument to be deconstructed.

Properties
Name Type Attributes Description
principals Array.<any>

The principals that are individually tested for explicit denial of any of the arg.actions.

actions Array.<any>

The actions none of which must be explicitly denied from arg.principals.

securable any

The thing access to which is being governed.

data any <optional>

Any contextual information needed for the access control decision; passed to each ACE's denies & grants methods.

Source:
Returns:

Whether any of the arg.principals are denied any of the (@param actions}.

Type
boolean

grant()

Deprecated:
  • use Acl#permit
Source:

grants(arg) → {boolean}

Returns whether all of the given actions are granted amongst the given principals against the given securable, and none of the principals are denied any of the actions.

Parameters:
Name Type Description
arg Object

The argument to be deconstructed.

Properties
Name Type Attributes Description
principals Array.<any>

The principals that must individually not be explicitly denied arg.actions and that must collectively be granted arg.actions.

actions Array.<any>

The actions none of which must be denied from individual arg.principals and all of which must be collectively granted amongst arg.principals.

securable any

The thing access to which is being governed.

data any <optional>

Any contextual information needed for the access control decision; passed into each ACE's denies & grants methods.

Deprecated:
  • use Acl#permits
Source:
Returns:

Whether the arg.principals are collectively granted.

Type
boolean

permit()

Since:
  • 1.3.0
Source:

permits(arg) → {boolean}

Returns whether all of the given actions are granted amongst the given principals against the given securable, and none of the principals are denied any of the actions.

Parameters:
Name Type Description
arg Object

The argument to be deconstructed.

Properties
Name Type Attributes Description
principals Array.<any>

The principals that must individually not be explicitly denied arg.actions and that must collectively be granted arg.actions.

actions Array.<any>

The actions none of which must be denied from individual arg.principals and all of which must be collectively granted amongst arg.principals.

securable any

The thing access to which is being governed.

data any <optional>

Any contextual information needed for the access control decision; passed into each ACE's denies & grants methods.

Since:
  • 1.3.0
Source:
Returns:

Whether the arg.principals are collectively granted.

Type
boolean

secure(arg) → {Acl}

Adds an access control entry (ACE). Idempotent if the ACE already exists.

Parameters:
Name Type Description
arg Object

The argument to be deconstructed.

Properties
Name Type Description
strategy AccessControlStrategy

The ACE's strategy.

principal any

The ACE's principal.

securable any

The ACE's securable.

action any

The ACE's action.

Source:
Returns:

This ACL in order to support a builder pattern.

Type
Acl

ungrant()

Deprecated:
  • use Acl#unpermit
Source:

unpermit()

Since:
  • 1.3.0
Source:

unsecure(arg) → {Acl}

Removes an access control entry (ACE). Idempotent if the ACE already absent.

Parameters:
Name Type Description
arg Object

The argument to be deconstructed.

Properties
Name Type Description
strategy AccessControlStrategy

The ACE's strategy.

principal any

The ACE's principal.

securable any

The ACE's securable.

action any

The ACE's action.

Source:
Returns:

This ACL in order to support a builder pattern.

Type
Acl