I'm writing a JIRA plugin which needs to present a list of Users to an Admin user. I'm using UserManager to check that the admin user has logged in but the UserManager appears to only have methods for a single user.
I have tried the REST API but using this from within the plugin requires credentials (e.g. BASIC AUTH) to be added to the request header and unless there are 'service' accounts, how can I retrieve the admin user's name and password to inject into the request header.
I'm using JIRA v 7.2.1 and can find no way to just get the list of users. Or do I need to call the database directly with a sql query?
There is an open Suggestion that may provide some hints on how to do this that you can find at JRASERVER-29069. I was able to get the existing users in my instance using the suggestions in JRASERVER-29069:
If JRASERVER-29069 helps please vote on the ticket and let us know.
I came up with the (dot) trick on my own and I can use the REST API if I paste the url into a browser after I have logged into JIRA. But the issue is I need to call it from Java code (within the plugin) and there's no way I can get the logged in user's credentials so that I can add them to the plugin's request - without them, it returns 0 users.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
A picture tells a thousand words. And agility boards have just released their latest feature: cover images on issues – so now your board can tell a story at first glance. Upload attachmen...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs