How to get a list of permissions granted to groups assigned to Project Roles.

Still need help?

The Atlassian Community is here for you.

Ask the community

Summary

The following query will give you a list of projects, the roles within that project, the group assigned to that role, and the permissions granted to that role. It only shows the association between group and project permission. If the permission is assigned through the project role or single user name, it won't be returned.

Environment

Jira Server / Data Center 8.x


This was written in MySQL syntax, so you may need to tweak it depending on the database you are using.

select distinct p.pname as project, r.ROLETYPEPARAMETER as RoleType, rr.NAME as role, s.PERMISSION_KEY as Permission 
from projectroleactor r 
left outer join projectrole rr on rr.id = r.projectroleID
inner join schemepermissions s on s.perm_parameter = r.roletypeparameter 
inner join project p on p.id = r.pid
order by p.pname, rr.NAME, r.ROLETYPEPARAMETER, s.PERMISSION_KEY; 

(warning) This is a pretty basic query, so you will probably have to alter it a bit to get the exact results you want. For example, you can add some criteria to limit the results by Project (where p.pname = "My Project") or by role (pr.NAME = "Developers"). 

Here is some explanation of what the columns are returning:

pname= Project Name
NAME = Project Role Name
ROLETYPEPARAMETER = This returns either a username or a group name depending on what is assigned to the Project Role
PERMISSION_KEY = This returns the permission assigned to the user or group in the project role

Last modified on Apr 6, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.