How to fetch role of a logged in user
Chandan M B (113●1●41●84)
| asked Jun 20 '15, 12:24 p.m.
edited Jun 20 '15, 4:15 p.m. by Ralph Schoon (63.5k●3●36●46)
Hi,
From my server side rtc extension plugin I need to fetch the role of a logged in user. Please let me know how to do it...
|
Accepted answer
I use this method to GET the users roles in a project area.
it is deprecated, and I haven't found what the replacement is yet. com.ibm.team.process.internal.common.RolePersistence.getPersistentRoleData(IProkectArea.getTeamData(), IContrinutorHandle srcuser) note that a user might have multiple roles. Chandan M B selected this answer as the correct answer
Comments
Chandan M B
commented Jun 22 '15, 2:12 a.m.
Hi Sam,
sam detweiler
commented Jun 22 '15, 6:20 a.m.
IApprovals = IWorkItem.getApprovals()
Chandan M B
commented Jun 22 '15, 7:34 a.m.
Thanks for the Approval code.
sam detweiler
commented Jun 22 '15, 7:56 a.m.
I used the code from my server participant plugin, built on Ralph's
Chandan M B
commented Jun 22 '15, 8:55 a.m.
I am able to fetch approval details.
the AbstractService your plugin extends, provides a method,
Consider reading some of the links provided below. They show the API that you can use to get the roles of a user. The API is common and can be used on client as well as server. Especially read https://rsjazz.wordpress.com/2015/06/19/a-custom-condition-to-make-attributes-required-or-read-only-by-role/
showing 5 of 7
show 2 more comments
|
One other answer
Ralph Schoon (63.5k●3●36●46)
| answered Jun 22 '15, 2:27 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Also see https://rsjazz.wordpress.com/2015/06/19/a-custom-condition-to-make-attributes-required-or-read-only-by-role/ for how to do that.
Comments also see https://rsjazz.wordpress.com/2012/10/01/adding-approvals-to-work-items-using-the-plain-java-client-libraries/ and https://rsjazz.wordpress.com/2012/11/30/a-create-approval-work-item-save-participant/ for how to use the approval API. |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.