Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to archive a user via the API

I have found a public API for deleting a user but I have found out that is a really bad idea. How in the API can I archive a user?

0 votes



3 answers

Permanent link
I would recommend doing this through the Web UI by clicking on User Management, and highlighting over the user name. This will create a button to archive the user. You can also run repotools to archive a user:
#repotools.bat -archiveUser

0 votes


Permanent link
I need an API for doing this. I want to be able to archive periodically several users from several servers and going to the UI will get cumbersome.

0 votes


Permanent link
For anyone interested, the code for archive user looks like this


IProgressMonitor monitor = new NullProgressMonitor();
IContributorManager cmgr = repo.contributorManager();
try {
IContributor contributor = cmgr.fetchContributorByUserId(userId, monitor);
contributor = (IContributor) contributor.getWorkingCopy();
contributor.setArchived(true);
cmgr.saveContributor(contributor, monitor);
} (catch ....)

0 votes

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Oct 27 '10, 8:22 a.m.

Question was seen: 7,880 times

Last updated: Oct 27 '10, 8:22 a.m.

Confirmation Cancel Confirm