Work with Permission Schemes
Permission schemes are a collection of PermissionGrant, which govern whether a user can do a particular action in any given project.
Within Jira, each project is associated with one permission scheme. However, a permission scheme can be associated with multiple projects. If you change a permission scheme you will affect all projects that use it. Learn more about permission schemes in Atlassian's documentation.
This page is specific to project permission schemes. If you want to modify projects see the Work with Projects page.
Retrieving a project's permission scheme
You can get a project's permission scheme as follows:
Modifying permission schemes
Add permissions to a permission scheme
You can add permissions to a permission scheme as follows:
When adding user or group custom fields to the permission scheme remember to use the custom field ID, not the custom field name. For example:
Completions
If completions are not visible when writing a script, you can trigger them using Ctrl + space.
Use completions on ProjectPermissions
to see the different permissions available, these correspond to the permissions available to you when managing project permissions in Jira.
Use completions on JiraPermissionHolderType
to see different permission holder types. JiraPermissionHolderType
completions correspond to the radio buttons in the Grant permission dialog box in Jira.
Remove permissions from a permission scheme
You can remove permissions from a permission scheme in a similar way to how you add permissions.
You can remove all permissions of a particular type using clearPermissions
:
Checking permissions
You can check if a permission is already granted as follows:
Alternately, you can get all permission grants for a specific permission type. In the following example we're getting all the permission grants for the Browse Projects project permission type.
You can also get all permissions grants for a specific permission type AND specific permission holder type. In the following example we're getting all the permission grants for Group permission holders with the Browse Projects project permission type.