How to get login information - Server side
Hello, How can I get information about the user that runs the Advisor/Participant on 'Save work item' Server side ? Thanks. |
Accepted answer
This is the code I searched for:
IRepositoryItemService itemService = getService(IRepositoryItemService.class);
IContributorHandle contributorHandle = this.getAuthenticatedContributor();
ContributorImpl contributor = (ContributorImpl)itemService.fetchItem(contributorHandle,null);
String loggedInUser = contributor.getUserId();
Ralph Schoon selected this answer as the correct answer
Comments Yehiel, code like that can be found here: https://rsjazz.wordpress.com/2012/11/30/a-create-approval-work-item-save-participant/
|
One other answer
use the getAuthenticatedContributor() method on the AbstractService to get the contributor object
with Eclipse, you can view the definitions of all the objects & classes.. |
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.