Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confluence CLI: Modifying multiple permissions

Louis Rowan February 7, 2019

Hello, I'm trying to run some commands with the confluence CLI to update multiple permissions for a user at once, such as with the below command:

 

./confluence.sh --action removePermissions --space "mySpace101" --userId "user1" --permissions "REMOVEOWNCONTENT,EDITBLOG,CREATEATTACHMENT,COMMENT"

 

However after running this (with console output "[REMOVEOWNCONTENT, EDITBLOG, CREATEATTACHMENT, COMMENT] permissions were removed from space: 'mySpace101' for: 'user1'."), I'm finding that the permissions table on the UI is NOT updated with the new permissions, and can confirm that user1 can still edit content, comment, etc.

 

If I use a separate command for each permission such as the below 4 lines:

./confluence.sh --action removePermissions --space "mySpace101" --userId "user1" --permissions "REMOVEOWNCONTENT"
./confluence.sh --action removePermissions --space "mySpace101" --userId "user1" --permissions "EDITBLOG"
./confluence.sh --action removePermissions --space "mySpace101" --userId "user1" --permissions "CREATEATTACHMENT"
./confluence.sh --action removePermissions --space "mySpace101" --userId "user1" --permissions "RREMOVEOWNCONTENT"

... I get the desired result where all 4 permissions are properly updated.

 

We're using cli version 8.1.0.

 

Any ideas on what is causing this behavior? Not only are we not able to update multiple permissions at once, but we are not alerted when the failure occurs. Running these commands 1 by 1 does work for us but is completely impractical when updating many permissions for many users.

2 answers

0 votes
Louis Rowan February 12, 2019

Any suggestions? Is the CLI not designed to run concurrent commands?

0 votes
Louis Rowan February 8, 2019

To add to this, we're also running into issues when running concurrent modifying operations.

 

For example, if I run a script that modifies one user's permissions to a space so that each permission is handled in a different command, and run in series, all permissions update properly.

 

However if I run an additional script at the same time that modifies a different user's permissions to a different space (also in series) these 2 scripts seem to conflict with each other and not all permissions end up being updated properly.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events