Forums

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

Is there a way to bulk move users from one group to another?

Steve Goldberg
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 21, 2013

We recently implemented LDAP and there is significant overlap between our users in the confluence internal directory and our active directory. While we're happy to make the 'switch' and lower the priority of the internal directory below the active directory, this will cause issues as our group names do not match exactly.

For example, we have a group in our internal directory called "staff" which contains all our staff members (as opposed to a group called "client", which contains just about everyone else) but in our active directory, this group is called "all-staff".

When we swap the order of the directories, the "staff" group (that we've applied to just about every space) that we set up will be useless as all our staff users will be in the "all-staff" group.

I have two questions, one of which I hope we can do:

  1. Can we bulk move the active directory users in the "all-staff" group to the "staff" group? OR
  2. Can we bulk change the group permissions (or rename?) the space permissions from "staff" to "all-staff"?

Thanks

4 answers

1 accepted

3 votes
Answer accepted
AndrewA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 18, 2013

allo,
There is no pretty way to do this via the UI but I believe we could bulk change the permissiosn via the database. The following SQL would change all permission entries for the group 'staff' and make them for 'all-staff'. Please keep in mind, this would be for ALL permissions that were specific to the 'staff' group across the entire instance of Confluence. Furthermore, I have not tested this against antying other then a small local instance. With that in mind, I highly suggest trying this in a test environment first and be sure to create a backup of the DB first.

UPDATE SPACEPERMISSIONS SET PERMGROUPNAME='all-staff' where PERMGROUPNAME='staff';

Cheers,
Andrew

P.S make sure Confluence is off when making these changes.

Steve Goldberg
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 18, 2013

Thanks! I'll try it out.

2 votes
BernardoA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 18, 2013

Reading this question I found some imporvement requests which informs similiar request that are still under analysis:

https://jira.atlassian.com/browse/CONF-26594

https://jira.atlassian.com/browse/JRA-4138

https://jira.atlassian.com/browse/JRA-3174

mickyd
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 15, 2016

JIRA Improvement Request portal....where requests go to die. 

1 vote
Ignacio Sebriano
Contributor
January 8, 2019

Hi community, 

Just in case. The one that worked for me was to copy the users from a sql query result and save it as a CSV file, then copy all the users from that CSV and add them to the group from JIRA using the normal procedure.

1 vote
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 13, 2018

Hello,

You could also do it with the Power Scripts for Confluence add-on:

https://marketplace.atlassian.com/apps/1219507/power-scripts-for-confluence?hosting=server&tab=overview

It is a free add-on. Here is the script you need:

string[] users = usersInGroups({"remove group name"});

for(number i = 0; i < size(users); i = i + 1) {
removeUserFromGroup(users[i], "remove group name");
 addUserToGroup(users[i], "add group name");
}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events