database table with all jira permissions

Hi, where I can find database table with all JIRA permissions?

I found a table with mapping between scheme, group and permissions, but I'm not able to find the reference table with permissions list

select * from jira_db.schemepermissions sp

Regards,

Michal

2 answers

1 accepted

1 vote
Accepted answer

If you can run SQL against your JIRA database (perhaps using the Bob Swift SQL macro from a Confluence page), then this MySQL query will give you what you much of what you're looking for. 

Note that the schemepermissions table shows permissions given directly to groups and the projectroleactor table shows permissions given to groups through project roles that contain groups.

 

-- Permissions given directly to group
SELECT SP.perm_parameter AS GroupName, PS.name AS PermissionSchemeName, SP.permission_key AS Permission
FROM schemepermissions SP 
INNER JOIN permissionscheme PS ON SP.scheme = PS.id
WHERE SP.perm_type = 'group' 
ORDER BY 1, 2, 3;
 
-- Permissions given indirectly to group through project role
SELECT PRA.roletypeparameter AS GroupName, PR.name AS RoleName, P.pname AS Project, PS.name AS PermissionSchemeName, SP.permission_key AS Permission
FROM schemepermissions SP 
INNER JOIN permissionscheme PS ON SP.scheme = PS.id
INNER JOIN projectrole PR ON SP.perm_parameter = PR.ID
INNER JOIN projectroleactor PRA ON PR.id = PRA.projectroleid
INNER JOIN project P on PRA.pid = P.id
WHERE SP.perm_type = 'projectrole' AND PRA.roletype = 'atlassian-group-role-actor'
ORDER BY 1, 2, 3;

Please bear in mind that this will only give you the basics for groups and roles.  Many JIRA installations use things like "assignee can edit", "member of custom field x can do transition" and so-on.

It's a good start for getting the general access layers for a project, but it won't tell you "who can do what" in full.

Very true, but if they don't have access to the project (directly or indirectly), then they can't any of that.

0 votes

It's hard-coded into a properties file, not the database.  (Generally, ignore the JIRA database, you really don't need to know)

Why are you looking?

Thanks, I need to know for one group all permissions in all security schemes and projects.

Is there a way how to cut it from properties file?

 

Regards,

 

Michal

The properties file gives the list of available permissions, which feels like what you were asking for from your question, but your comment clarifies that you're actually looking for "who can do what"

That's a lot more complex, as it's possible to grant permissions to groups in at least four totally different ways.  To get a full picture of them all, you'll need to read fields from individual issues, security schemes, permissions, and the workflow (which needs to be parsed), on top of the group/user stuff.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted 11 hours ago in Statuspage

How do your teams prepare for really high (planned) traffic days like Cyber Monday?

Hi there! Shannon from Statuspage here.  👋  With Cyber Monday quickly approaching, we're looking to hear from Atlassian customers – specifically from teams who touch incident response li...

31 views 0 4
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you