JIRA. Permission scheme automated editing

Hello fellas!

I got a question concerning fast/automated/semiautomated editing of permission scheme. Let's say my company uses lots of projects and I want to create new project and use as a template permission scheme from another one.

My aim is to be able to replace some key words and save new permission scheme. I wonder if I can save Permission scheme in xml or something. It would really helped my to speed up projects creating and avoid human error factor. I'll be glad for any applicable methods.

Thanks,

Ivan.

5 answers

0 vote

Would it not be better to use the same permission scheme for all the projects? If you avoid the use of groups and use roles instead, you can have one permission scheme and then delegate the maintenance of users to the project owners (or, if the reason for multiple permission schemes is that you want to poke groups into them, then put the groups in the roles with a script)

You see we use policy: jira-KEY-users, where KEY is project key, and in my case it is keyword precisely, so I'd like to have ability somehow to replace that key and all items of permission scheme and assign it to another project.

Mmm. Well, you'll need to do some coding if you insist on doing it the hard way. One permission scheme per project isn't really a good approach, and although there is a "copy permission scheme" available to the UI (but not in REST, so you can't script or automate easily), you still have to then go in and manually edit the scheme if you want to change the settings.

It would be far better to do this:

  • Create one permission scheme that, instead of using "group: jira-key-users", uses "role: IvansUser" (IvansUser is a role I made up and you'd need to add it - you might want to re-use one of the existing roles, or at least come up with a better name!)
  • Apply that scheme to each of your new projects
  • Use REST to script "add group:jira-KEY-user to the role of IvansUser in project KEY" every time you create a new project

This way you have one consistent permission scheme, a really simple "new project" process, and you get to maintain groups in the same way that you already do. You have minimal coding and simple config.

I've used SOAP to automate some sample manipulations, like user creating and groups manipulation (add/remove). Although I need to dig in here. I see here https://docs.atlassian.com/rpc-jira-plugin/4.4/com/atlassian/jira/rpc/soap/JiraSoapService.html:


addPermissionTo
deletePermissionFrom

these methods, might do what I need.

They should, but it's still going to leave your Jira littered with permission schemes.

Also, it's going to stop working. Jira 7 will have no SOAP interface.

> Jira 7 will have no SOAP interface.

hm, too bad.

0 vote

The SOAP methods don't scale to 10K users either. I'm going to use Script Runner instead.


Matt,

Thanks, I will look into that.

Ivan.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Sunday in Agility

You asked for it, so we delivered: images on issues have arrived

A picture tells a thousand words. And agility boards have just released their latest feature: cover images on issues – so now your board can tell a story at first glance. Upload attachmen...

171 views 1 10
Read article

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