Hi I am trying to check whether the logged-in user is part of a specific role in JIRA project. I could have easily done that in server plugins with
Collection<ProjectRole> projectRoles =
projectRoleManager.getProjectRoles(applicationUser, project);
But I cannot find any such rest api to check user role in a project. Please help asap.
Community moderators have prevented the ability to post new answers.
The following JIRA REST API's should let you do what you need to do.
Also see these related issues.
Also, if the /rest/api/2/project/<projectIdOrKey>/role/<id> rest api would give you what you need then why not just request ADMIN access for your add-on?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Alok Singh, if you are attempting to get attention on your Atlassian Connect questions then you are better off adding the 'atlassian-connect' label to your issues. That will result in a faster response. I have been on holidays for the past few weeks.
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.
Currently I am using
/rest/api/2/project and
/rest/api/2/project/{projectKey} to check user has the specific role.
After running these API's I am trying to use
GET /rest/api/2/project/{projectIdOrKey}/role/{id}
which gives 401(unauthorized) for non admin users.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.