How can I get the current user from a server-side advisor?
I'm sure this is easy but I haven't been able to find it.
I need to get the "current user" from within the run() method of a validator. I was hoping there was some nice API but didn't seem to find anything other than getting the "getModifiedBy()" from the newState() (which would then be the user who is going to be set as the person who last modified the work item). Is there anything else?
I need to get the "current user" from within the run() method of a validator. I was hoping there was some nice API but didn't seem to find anything other than getting the "getModifiedBy()" from the newState() (which would then be the user who is going to be set as the person who last modified the work item). Is there anything else?
Accepted answer
the AbstractService class provides
getAuthenticatedContributor();
in eclipse, enter a blank line, ctrl-spacebar will show all the methods available
getAuthenticatedContributor();
in eclipse, enter a blank line, ctrl-spacebar will show all the methods available
Comments
showing 5 of 8
show 3 more comments