User creation in JTS/ELM using Java Libraries.
I want to create a user in JTS using Java. I am able to achieve this in two ways. But both of these ways has its limitations.
- I am able to add a new user to JTS using IContributorManager and it is getting reflected in the Active Users immediately.
- Limitation : Using this method neither I am able to set my own password to the user at the time of creation nor I can add my user to any groups such as JazzAdmins, JazzProjectAdmins, JazzGuests and JazzUsers.
- Using this method I am able to create a new user with my own password and add the user to groups.
- Limitation : Using this method the user is getting created in JTS but it is not showing in the Active Users page until and unless I import the user using Import Users functionality in the Active Users page. Also while importing the user I have to search the whole user id to select the user that was created.
One answer
In a real world setup, you do not add the user to the ELM system. You add the user to the LDAP (ExternalUserRegistry) or other authentication system. Usually ELM has no rights to create users there. This is where the password is set as well.
Once you have done that, you synchronize the user into the system, when you do this, the internal user ID representing that user in the Jazz system is created (IConbributorManager?).
I have not tried to do this, on my own, but I suspect if you have the permission to create the user with the IExternalUserRegistryMananger, you will have to perform a creation of the user using the Contributor manager.
It would be possible to debug what happens when the UI does it.
The latter option will never work for any enterprise that uses LDAP or JAS.
Comments
Do we have any available rest apis that can do this task ??
See https://jazz.net/wiki/bin/view/Deployment/CLMProductAPILanding Jazz foundation APIs. Same rules apply of course.