It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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
Answer accepted

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;
Nic Brough Community Leader Jun 09, 2016

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
Nic Brough Community Leader Jun 07, 2016

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

Nic Brough Community Leader Jun 08, 2016

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 in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

1,072 views 7 0
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you