Hi everyone!
We have the following use care:
1. We log into jira with a standard user lets say "user A" (without admin permissions)
2. We use a custom plugin to copy an issue from "project A" to "project B" with the corresponding fix versions and components attached to this issue.
If "user A" has not admin permissions for "project B" we get an error message when creating components and fix versions (403 Forbidden).
Now the idea is that we would like to use different credentials for the REST calls creating componentes and fix versions (lets say "user B" who has admin permissions). So we change the Authorization header of the REST call to "user B" and get all elements created.
Unfortunately the issue with this solution is that the user loged into jira "user A" is changed to "user B" and that is what we want to omit because we would like to be still "user A".
Is it possible to call the REST API as a different user but still be able to continue after that as the old loged in user?
I have goggled a bit but without luck...
Thanks for help.
Michał
Community moderators have prevented the ability to post new answers.
Nope, you will have to loggin as different users. You can't login as one user and then do operations as another using REST.
You can extend the remote API using a REST plugin and then expose a new functionality which does this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yapp... I was hoping it would be possible in some way...
Thanks for the good idea with custom REST plugin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does JIRA have the SOAP API like Confluence does? If so you could use the SOAP API and get an auth token with user B's creds and then perform the stuff with the SOAP API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes but it is depricated in JIRA 6 and will be removed in JIRA 7, so it is not the way I will go :)
https://developer.atlassian.com/display/JIRADEV/SOAP+and+XML-RPC+API+Deprecated+in+JIRA+6.0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, well that's a bummer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.