How to update a user directory?

srinivasp
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 18, 2012

I have a user associated with one directory but now he got moved to other and so the user is unable to login. How to handle this?

1 answer

0 votes
Eva
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 18, 2012

are you refering to LDAP or JIRA directory? For the former, you can go to admin -> Users -> User Directories and just synchronize the LDAP to current.

I am not too sure how moving the user from one directory to another would make the user unable to login unless that user has 2 different passwords in these 2 directories.

srinivasp
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 19, 2012

The user got removed from one directory and created in other directory but the authentication against ldap. We cannot synchronize ldap to current jira and so this problem raised. We cannot delete the user in jira because he is assigned with some data.

Eva
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 19, 2012

ah one of those icky, hidden ones. I had few of those (actually one of them is my account in ldap which I dont even used). The only way I end up doing is to go to the database directly and 'erase' the previous footprint directly. You have to do several sql against cwd_user (to find user id, directory_id (1 = jira, other numbers meaning ldap or non-jira)) and cwd_membership. You shouldnt delete the user as that will mess up your history and such (and probably give you errors later on), so I would suggest deleteing the record in existing cwd_membership for that particular user.

Of course, strongly suggest you back up the data and doing this off hours if you are doing this in production.

There is probably another way that someone can chip in, but so far, that's how i got around with it since it seems like a dangling situation to me.

srinivasp
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 20, 2012

Also tried this way but no luck..

CrowdService crowdService = (CrowdService) ComponentManager.getInstance().getCrowdService();
User jiraUser = crowdService.getUser("abury");
UserTemplate template = new UserTemplate(jiraUser);
template.setDirectoryId(5);
crowdService.updateUser(template);

Suggest an answer

Log in or Sign up to answer