Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How can i change jira http request user ?

Frederic Esnault October 10, 2015

Hi I'm wondering how to make a plugin that would change the logged in user. Say you're an admin, and you select a user in a list, and you want to be connected as this user. I didn't find how to do this, and i tried a filter creating a custom HttpServletRequestWrapper implelementation, but my getRemoteUSer is never called.

 

Any idea ?

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 10, 2015

I agree with Nick in statement "you better do not do it". But if you really need you can try to play with jiraAuthenticationContext.setLoggedInUser.

Frédéric Esnault October 11, 2015

Thanks @Volodymyr Krupach , That was the good way to do it. I already tried that but not in the right place. Now it works fine thanks !

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 10, 2015

Generally there's no particularly good reason to do this - I've not run into any strong case where impersonating a user in order to debug a problem is better than understanding the root cause of the problem.

However, there are a few  add-ons that will let you do it.  I am aware of two (but I think there are more) - the SU add-on does nothing more than letting an admin re-login as a user, and the Script Runner has the same function amongst loads of others.

0 votes
Dave C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 11, 2015

Perhaps you may want to try SU for JIRA? Sounds like this will give you the functionality you're after.

Frédéric Esnault October 11, 2015

Yes, no doubt, but it's not free, and I want full control on the plugin providing this functionality, given its sensitive nature.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events