Related to this question, an alternative way I might solve the problem is to store a new unique username as an attribute on the Crowd user. However, it's not clear looking at the REST API that I can search by property key/value pairs. For example, I currently can search for username or email like so:
TermRestriction<String> byEmail = new TermRestriction<String>(UserTermKeys.EMAIL, email);
TermRestriction<String> byUsername = new TermRestriction<String>(UserTermKeys.USERNAME, username);
SearchRestriction search = new BooleanRestrictionImpl(BooleanRestriction.BooleanLogic.OR, byEmail, byUsername);
List<User> users = crowdClient.searchUsers(search, 0, 10);
The question is: can I search by user attribute instead?
Thanks!
Patrick
Community moderators have prevented the ability to post new answers.
As i can find, there are com.atlassian.crowd.search.query.entity.restriction.constants.AliasTermKeys in crowd-api-2.2.8 at least. Comments says what this Term respond for users aliases. There is also public interface com.atlassian.crowd.manager.application.AliasManager.
But as i understand it will actually work only in Crowd, not in EmbededCrowd.
What do you mean when you say "Crowd" or "EmbeddedCrowd"? I'm looking for something that will let me make remote queries using the REST or SOAP API. Those interfaces look like they would require a Crowd plugin, yes?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also i think your could expose needed logic by writing your own REST plugin for crowd
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Since JIRA 4.3 it has embedded crowd for user management.
But looking deep in source of Crowd i can say what Alias search is not exposed in remote API. According to http://confluence.atlassian.com/display/CROWDDEV/Crowd+Query+Language it's not possible.
I think you could raise issue in support tracker
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.