This file contains the readily available functions which interact with the ITSLanguage role API.
Roles are named groups of permissions. A role is typically assigned to a user to grant a user permissions.
Members
(inner, constant) url :string
- Source:
The URL for the role handler(s).
Type:
- string
Methods
(static) create(role) → {Promise}
- Source:
Create a new role.
Parameters:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
role |
Object | The role to create. Properties
|
Returns:
- The user creation promise.
- Type
- Promise
(static) getAll(filtersopt) → {Promise}
- Source:
Get a all roles.
By default all roles are fetched though it is allowed to pass filters as a URLSearchParams
object.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
filters |
URLSearchParams |
<optional> |
The filters to apply to the category list. |
Throws:
-
- If the given optional filters are not an instance of
URLSearchParams.
- If the given optional filters are not an instance of
- Type
- Promise.<string>
Returns:
- The promise for the roles.
- Type
- Promise
(static) getById(id) → {Promise}
- Source:
Get a single role by its ID.
Parameters:
| Name | Type | Description |
|---|---|---|
id |
string | The ID of the desired role. |
Returns:
- The promise for the role.
- Type
- Promise