new RoleClient(jiraClient)
Used to access Jira REST endpoints in '/rest/api/2/role'
Parameters:
Name | Type | Description |
---|---|---|
jiraClient |
JiraClient |
- Source:
Methods
addActors(opts, callbackopt) → {Promise}
Adds default actors to the given role. The request data should contain a list of usernames or a list of groups to add.
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
Object | The request options sent to the Jira API. Properties
|
|||||||||||||
callback |
<optional> |
Called when the permissions have been returned. |
- Source:
Returns:
Resolved when the permissions have been returned.
- Type
- Promise
createRole(opts, callbackopt) → {Promise}
Creates a new ProjectRole to be available in Jira. The created role does not have any default actors assigned.
Parameters:
Name | Type | Attributes | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
opts |
The request options sent to the Jira API. Properties
|
||||||||
callback |
<optional> |
Called when the scheme has been created. |
- Source:
Returns:
Resolved when the scheme has been created.
- Type
- Promise
deleteRole(opts, callbackopt) → {Promise}
Deletes a role. May return 403 in the future
Parameters:
Name | Type | Attributes | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
Object | The request options sent to the Jira API. Properties
|
||||||||||
callback |
<optional> |
Called when the permissions have been returned. |
- Source:
Returns:
Resolved when the permissions have been returned.
- Type
- Promise
getActors(opts, callbackopt) → {Promise}
Gets default actors for the given role.
Parameters:
Name | Type | Attributes | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
opts |
Object | The request options sent to the Jira API. Properties
|
|||||||
callback |
<optional> |
Called when the permissions have been returned. |
- Source:
Returns:
Resolved when the permissions have been returned.
- Type
- Promise
getAll(opts, callbackopt) → {Promise}
Get all the ProjectRoles available in Jira. Currently this list is global.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
opts |
The request options sent to the Jira API. |
||
callback |
<optional> |
Called when the permissions have been returned. |
- Source:
Returns:
Resolved when the permissions have been returned.
- Type
- Promise
getRoleById(opts, callbackopt) → {Promise}
Get a specific ProjectRole available in Jira.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
opts |
The request options sent to the Jira API. |
||
callback |
<optional> |
Called when the permissions have been returned. |
- Source:
Returns:
Resolved when the permissions have been returned.
- Type
- Promise
removeActor(opts, callbackopt) → {Promise}
Removes default actor from the given role.
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
Object | The request options sent to the Jira API. Properties
|
|||||||||||||
callback |
<optional> |
Called when the permissions have been returned. |
- Source:
Returns:
Resolved when the permissions have been returned.
- Type
- Promise
updateRole(opts, callbackopt) → {Promise}
Fully updates a roles. Both name and description must be given.
Parameters:
Name | Type | Attributes | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
The request options sent to the Jira API. Properties
|
|||||||||||
callback |
<optional> |
Called when the permissions have been returned. |
- Source:
Returns:
Resolved when the permissions have been returned.
- Type
- Promise