Couldn't get correct member role from "getContributorRoles" RCT API
In one of RCT projects.
We use "IRole[] roles = iClientProcess.getContributorRoles(member, iProcessArea, monitor);" to roles of member.
The problem is that
1. Member has only one role in RTC
2. The API return 3 roles
|
One answer
Ralph Schoon (63.6k●3●36●46)
| answered Mar 11 '16, 2:14 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
In my experience, the API is usually right and it is most likely an issue with the assumption of the user that is causing the difference.
If you add a user to a project/team area and assign them a role, the user actually has two roles already. The "default" or everyone role that anyone has as a member of the area, plus the role that you assign the user. See https://jazz.net/library/article/291 and https://jazz.net/library/article/292 for more details. Comments
Yi-Hung Lee
commented Mar 11 '16, 3:40 a.m.
Dear Ralph,
Thank your feedback. But we not for the new adding user
Following are the additional information.
1. User-A with "Developer" role
2. Use "getContributorRoles" to get User-A's role and it feedback "Developer", "SD" and "SA"
This is our problem, they are existed users.
Yi-Hung Lee
commented Mar 11 '16, 3:42 a.m.
Dear Ralph,
Thank your feedback. But we not for the new adding user
Following are the additional information.
1. User-A with "Developer" role
2. Use "getContributorRoles" to get User-A's role and it feedback "Developer", "SD" and "SA"
This is our problem, they are existed users.
I can't comment on the information above. You can find some code getting role information in https://rsjazz.wordpress.com/2015/08/07/a-custom-condition-to-make-attributes-required-or-read-only-by-role-version-2/ and in some other posts on that blog.
|
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.
Comments
Dear Ralph,