RolesModule

roles. RolesModule

Module which handles user roles

Constructor

new RolesModule()

Source:

Extends

  • AbstractApiModule

Members

roleCache :Object

Source:
Local store of roles
Type:
  • Object

Methods

(async) getScopesForRole(_id) → {Array.<String>}

Source:
Returns the list of scopes for the given role
Parameters:
Name Type Description
_id String | ObjectId The _id of the role
Returns:
Array of scopes
Type
Array.<String>

(async) init()

Source:

(async) initConfigRoles() → {Promise}

Source:
Adds any role definitions from the current config file to the database
Returns:
Type
Promise

(async) initDefaultRoles() → {Promise}

Source:
Handles setting defined default roles when new users are added
Returns:
Type
Promise

(async) onUpdateRoles(req) → {Promise}

Source:
Handler for requests which attempt to update roles
Parameters:
Name Type Description
req external:ExpressRequest
Returns:
Type
Promise

(async) setValues()

Source:

(async) shortNamesToIds() → {Promise}

Source:
Adds the specified default roles during new user creation
Returns:
Type
Promise