How to login a user inside of jira with plugin?

Ma Hao January 13, 2014

I mean how to directly set a user as login.

I just want to use the user to create issue operation on background.

Scenario like: remote site request to create issue, the plugin will recive the request and create issue on jira.

Remove site could not to be modified with the request headers nor use the JIRA Client APIs.

Current problem is :request comes, when plugin try to add issue,remote site recieve errors with "anonymouse do not have permission to create issue" reported.

2 answers

1 accepted

1 vote
Answer accepted
Radu Dumitriu
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.
January 13, 2014

JiraManagers.getJiraAuthenticationContext().setLoggedInUser(user);

0 votes
Ma Hao January 14, 2014

Thanks so much for your reminding.

But the Jiramanager interface is depracated already.

Now we can use ComponentAccessor:

ComponentAccessor.getJiraAuthenticationContext().setLoggedInUser(user);

Suggest an answer

Log in or Sign up to answer