How to fetch role of a logged in user
![]()
Chandan M B (113●29●63)
| asked Jun 20 '15, 12:24 p.m.
edited Jun 20 '15, 4:15 p.m. by Ralph Schoon (62.0k●3●36●43)
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 Hi Sam,
IApprovals = IWorkItem.getApprovals()
Thanks for the Approval code.
I used the code from my server participant plugin, built on Ralph's
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 (62.0k●3●36●43)
| 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. |