Couldn't get correct member role from "getContributorRoles" RCT API
![](http://jazz.net/_images/myphoto/5ddeb74e6d26a24afdd102072acd8a26.jpg)
One answer
![](http://jazz.net/_images/myphoto/5ddeb74e6d26a24afdd102072acd8a26.jpg)
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.
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
![](http://jazz.net/_images/myphoto/5ddeb74e6d26a24afdd102072acd8a26.jpg)
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.
![](http://jazz.net/_images/myphoto/5ddeb74e6d26a24afdd102072acd8a26.jpg)
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.
![](http://jazz.net/_images/myphoto/e5e63d5878217b64611c1df9401b7cd3.jpg)
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.
In the Eclipse Client you can right click a project area and select "Create Runtime report" The exported HTML file should also tell you which users have which role in which context, should you be unsure.
Comments
Yi-Hung Lee
Mar 11 '16, 3:43 a.m.Dear Ralph,