Line Command - permissionScheme Jira

Renan de SIlva e Souza August 27, 2013

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
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 27, 2013

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.

Renan de SIlva e Souza August 27, 2013

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?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 27, 2013

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 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 27, 2013

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 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 27, 2013

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