Creating user in TomCat using IExternalUserRegistryManager
Does anyboy have an example how to use this api calss to create users in Tomcat.
|
One answer
I used the following code snippet.
IContributorManager contributorManager = repo.contributorManager(); String groups[] = {"JazzUsers"}; String user_id = "test"; // create a user into "Tomcat" External User Registry String user_name = "TEST"; String password = user_id; String email = user_id+"@my.com"; userRegistryManager.addExternalUser(user_id, password, user_name, email, groups, monitor); System.out.println("Add user to Tomcat."); // create a user into Jazz DB IContributor contributor = (IContributor) IContributor.ITEM_TYPE.createItem(); contributor.setUserId(user_id); contributor.setName(user_name); contributor.setEmailAddress(email); contributorManager.saveContributor(contributor, monitor); System.out.println("Add user to Jazz."); |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.