Constructor
new RolesModule()
- Source:
Extends
Methods
(async) getScopesForRole(_id) → {Array.<String>}
- Description:
- Returns the list of scopes for the given role
- Source:
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}
- Description:
- Adds any role definitions from the current config file to the database
- Source:
Returns:
-
Type
-
Promise
(async) initDefaultRoles() → {Promise}
- Description:
- Handles setting defined default roles when new users are added
- Source:
Returns:
-
Type
-
Promise
(async) onUpdateRoles(req) → {Promise}
- Description:
- Handler for requests which attempt to update roles
- Source:
Parameters:
| Name |
Type |
Description |
req |
external:ExpressRequest
|
|
Returns:
-
Type
-
Promise
(async) setValues()
- Source:
(async) shortNamesToIds() → {Promise}
- Description:
- Adds the specified default roles during new user creation
- Source:
Returns:
-
Type
-
Promise