Is it possible to Migrate user groups from 1 directory to another?

sharma-shweta August 27, 2013

Hi,

We currently have 2 directories under confluence (Confluence-Internal and Work-Internal). We are using Oracle db.

We plan to move the Work-Internal Directory up and make it the primary one. Since there are common users in both directories, we need to transfer the groups the users are a part of from the Confluence-Internal to the Work-Internal Directory.

Is there any way we could achieve this for Oracle db?

Thanks!

4 answers

1 accepted

0 votes
Answer accepted
Sreenivasaraju P
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.
August 27, 2013

You can user userAccessor API

Group gp = userAccessor.getGroup("confluence-users");

User addUser = userAccessor.getUser(employeeString);

if(null != addUser)

{

userAccessor.addMembership(gp, addUser);

}

sharma-shweta August 27, 2013

Thank you :)

sharma-shweta August 27, 2013

Thanks :)

Do we need to specify any admin access for to script to run successfully?

Sreenivasaraju P
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.
August 27, 2013

yes.

User adminuser = userAccessor.getUser("xxxxx");//any admin user from confluence-admin

AuthenticatedUserThreadLocal.setUser(adminuser);

0 votes
sharma-shweta August 27, 2013

Yes, I want to add people to groups. I need to add 1100+ people a particular group, and I am hoping there is an api which will make my task easier.

0 votes
Sreenivasaraju P
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.
August 27, 2013

Do you want to add/remove people from groups?

0 votes
sharma-shweta August 27, 2013

Are there any Confluence apis that we could use to change a user's group?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events