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

pre-condition action: how to read userID

Hi,
I am developing a pre-condition and extending AbstractService, implementing IOperationAdvisor.
I am binding the pre-condition to work item save operation.
Is it possible to read connected users ID?
If yes, Can you please provide appropriate APIs?
Thanks,

0 votes



One answer

Permanent link
You can use "getAuthenticatedContributor()" to get the contributor ItemHandler and then use "IRepositoryItemService" to fetch IContributor.

Something like this:


IRepositoryItemService repositoryService = getService(IRepositoryItemService.class);
IContributor loggedContributor = (IContributor) repositoryService.fetchItem(getAuthenticatedContributor(), null);


Hi,
I am developing a pre-condition and extending AbstractService, implementing IOperationAdvisor.
I am binding the pre-condition to work item save operation.
Is it possible to read connected users ID?
If yes, Can you please provide appropriate APIs?
Thanks,

1 vote

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
× 10,938

Question asked: Mar 04 '11, 7:20 a.m.

Question was seen: 4,889 times

Last updated: Mar 04 '11, 7:20 a.m.

Confirmation Cancel Confirm