Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

using role in js

 Good morning,

i need to retrieve the role of the registrant via javascript.

is there any way you can do it using javascript?

thank you so much.

0 votes



One answer

Permanent link
The JavaScript object "com.ibm.team.repository.web.client.internal.AUTHENTICATED_CONTRIBUTOR_ROLES" contains the repository roles (JazzAdmins, and etc). Note that this is meant for internal use only.

I don't know any ways to retrieve the process roles (project level) for a user given the limitation of the JavaScript extension (it's really meant for dealing with the current work item only).

0 votes

Comments

I second that and would also like to state that objects like the one Don mentions above, are only available in the RTC Web UI. They are not available in the JS running in the Eclipse client.

You can use Java to create attribute customizations to access this in Eclipse and in the Web UI. See https://rsjazz.wordpress.com/2013/06/26/attribute-customization-java-based-value-providers-conditions-and-validators/ and https://rsjazz.wordpress.com/2015/08/07/a-custom-condition-to-make-attributes-required-or-read-only-by-role-version-2/ for example code.

You might be better off using a follow up action, because that only needs to be deployed on the server. See https://rsjazz.wordpress.com/2015/09/30/learning-to-fly-getting-started-with-the-rtc-java-apis/ for more information about your options.

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Jan 27 '16, 6:34 a.m.

Question was seen: 1,881 times

Last updated: Feb 17 '16, 1:51 a.m.

Confirmation Cancel Confirm