Line Command - permissionScheme Jira

I run some information on the Linux command line to create user or create a group in JIRA confome example below:


(sh $ jira - action addUser - userId "$ name" - USEREMAIL "$ email" - userPassword "$ password" - server "https://oohm-software.atlassian.net" - user "$ LOGIN "- password = $ pASSWORD)

I needed to set access permission to the project via the command permissionScheme, how can I do this from the command line in Linux?

3 answers

1 vote

It's not quite as simple as "give project access to a user" because there's a layer between project and user. I'm not exactly sure what you want to do here, but assuming you want to grant your new user access X to project XYZ, then you need to alter something so that they match the rule you've set up for X in the permission scheme.

Let's say your permission scheme says "Browse: Group = myDevelopers", then your script would need to add the user to the group of myDevelopers to enable their access. If it said "Browse: Role = developers", then you need to add them to the project role of deelopers, not a group. There may be other things you want to do.

Anyway, to do either group or role, try -action addProjectRoleActors - it expects either the project, role and userid, or the group and the userid.

Ok I added a test user in the test group as example below:

jira.sh sh - action AddUserToGroup - userId "test" - group "test" - server "https://oohm-software.atlassian.net" - user "renan@oohm.com" - password = 632 659

after this is done I have to do to complete the issue of permission via the command line?

It's not that simple - you should be looking at the permission scheme in order to work out what group to add the user to. Once you know the right group, you can add as many users as you want with the CLI, and you don't have to think about it again.

In other words, you don't try to alter the permission scheme on every new user. You should set it up correctly and then use it as intended.

From memory, I don't think there's a way to update it via REST anyway.

0 vote

It's not quite as simple as "give project access to a user" because there's a layer between project and user. I'm not exactly sure what you want to do here, but assuming you want to grant your new user access X to project XYZ, then you need to alter something so that they match the rule you've set up for X in the permission scheme.

Let's say your permission scheme says "Browse: Group = myDevelopers", then your script would need to add the user to the group of myDevelopers to enable their access. If it said "Browse: Role = developers", then you need to add them to the project role of deelopers, not a group. There may be other things you want to do.

Anyway, to do either group or role, try -action addProjectRoleActors - it expects either the project, role and userid, or the group and the userid.

0 vote

It's not quite as simple as "give project access to a user" because there's a layer between project and user. I'm not exactly sure what you want to do here, but assuming you want to grant your new user access X to project XYZ, then you need to alter something so that they match the rule you've set up for X in the permission scheme.

Let's say your permission scheme says "Browse: Group = myDevelopers", then your script would need to add the user to the group of myDevelopers to enable their access. If it said "Browse: Role = developers", then you need to add them to the project role of deelopers, not a group. There may be other things you want to do.

Anyway, to do either group or role, try -action addProjectRoleActors - it expects either the project, role and userid, or the group and the userid.

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
Asked 12 hours ago in Confluence

What are the resources that you use to learn more about Atlassian Products?

I am gathering information about resources available for Atlassian product knowledge transferring for a presentation in our local Atlassian User Group. I want to group them in four categories From ...

59 views 3 4
View question

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