Check a user's project roles via REST API?

762 views
Skip to first unread message

b...@site9.com

unread,
Mar 5, 2014, 4:37:32 PM3/5/14
to atlassian-...@googlegroups.com
From what I can gather there is no way to test a user's project-role membership via the REST API? I'm trying to use a remote condition to limit access to our add-on on a per-project basis. For example, in our V2 add-on I used com.atlassian.jira.security.roles.ProjectRoleManager.isUserInProjectRole inside my condition class.

Peter Brownlow

unread,
Mar 5, 2014, 5:53:57 PM3/5/14
to atlassian-...@googlegroups.com
Hi,

Have you tried using the "mypermissions" resource with a project key or id?

-Peter

b...@site9.com

unread,
Mar 5, 2014, 8:19:54 PM3/5/14
to atlassian-...@googlegroups.com
Hi Peter,

Yes, that works for getting project-specific permissions, but it doesn't include the user's Roles. Perhaps there's a better way to accomplish what I need? My goal is to have a custom role/permission that an admin can grant to a user in order to enable my add-on for a specific project.

thanks,
Ben

Seb Ruiz

unread,
Mar 5, 2014, 9:04:13 PM3/5/14
to atlassian-...@googlegroups.com
Hi Ben,

With the upcoming changes to add-on user management that we are rolling out (See security docs for more details) we will be providing this functionality out of the box through user permissions.

If an administrator does not wish to grant your add-on access to a specific project, then they can remove the user that will be created for your add-on from the relevant project permission scheme/role.

In the future we'll make this part of the add-on installation workflow.

Does that help?
Cheers,
Seb


--
You received this message because you are subscribed to the Google Groups "Atlassian Connect Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to atlassian-connec...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Seb Ruiz
Atlassian

b...@site9.com

unread,
Mar 5, 2014, 9:41:41 PM3/5/14
to atlassian-...@googlegroups.com
Thanks Seb, that sounds like it will do the trick nicely!
To unsubscribe from this group and stop receiving emails from it, send an email to atlassian-connect-dev+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
Seb Ruiz
Atlassian
Reply all
Reply to author
Forward
0 new messages