Methods
(static) create(RoleId, permissionId) → {Promise.<void>}
Creates an association between a role with RoleId and a permission with id
Parameters:
Name | Type | Description |
---|---|---|
RoleId |
int | |
permissionId |
int |
- Source:
Returns:
- Type
- Promise.<void>
(static) delete(roleId, permissionId) → {Promise.<void>}
Delete the association between a role and a permission
Parameters:
Name | Type | Description |
---|---|---|
roleId |
int | |
permissionId |
int |
- Source:
Returns:
- Type
- Promise.<void>
(static) get() → {Promise.<(Object|Error)>}
Returns all association between roles and permissions
- Source:
Returns:
- Type
- Promise.<(Object|Error)>
(static) getByPermission(id) → {Promise.<(Object|Error)>}
Returns all the roles associated to a specific permission
Parameters:
Name | Type | Description |
---|---|---|
id |
int | Id of the permission you want to get |
- Source:
Returns:
- Type
- Promise.<(Object|Error)>
(static) getByRole(roleId) → {Promise.<(Object|Error)>}
Returns all the permissions associated to a specific role
Parameters:
Name | Type | Description |
---|---|---|
roleId |
int |
- Source:
Returns:
- Type
- Promise.<(Object|Error)>