how to get currect user process roles of project area in javascript
Hi All,
I have added read only for condition in my project area with javascript. In java script I want to check current user's preocess role. If user has admin role in project area then he can edit the work item.
Form net I got the below code
IRole[] contributorRoles = processServerService.getServerProcess(processArea).getContributorRoles( contribHandle, processArea);
But how to get values for contribHandle,processServerService.
I found another jazz link
but it gives creator not current user and roles.
please can any one tell me how to get current user roles in javascript.
Thanks,
Kavita
2 answers
Kavita, as far as I can tell you can't do that with scripts. We had a similar question some days ago. Please go there for the details. https://jazz.net/library/article/1093 will soon talk about JavaScript too and provide an overview of the limitations.
JavaScript is for simple customization and has limits. You can only access the work item itself and only limited for attributes for complex types. So if you want to do quite complex things that exceed the data of the work item available, you should look into a Java Server extension, rather than using JavaScript.
JavaScript is for simple customization and has limits. You can only access the work item itself and only limited for attributes for complex types. So if you want to do quite complex things that exceed the data of the work item available, you should look into a Java Server extension, rather than using JavaScript.
Comments
After reading more, i stumbled across this content https://jazz.net/wiki/bin/view/Main/AttributeCustomization#Providing_new_customizations_imp . I think this would be the way to go, if you want to contribute to conditions, but need the Java API. Please be aware you might need to deploy it on the server and the Eclipse client, if i understand it correctly.
Comments
Millard Ellingsworth
FORUM ADMINISTRATOR / JAZZ DEVELOPER Jan 03 '13, 7:10 p.m.Millard Ellingsworth
FORUM ADMINISTRATOR / JAZZ DEVELOPER Jan 04 '13, 2:00 p.m.Millard Ellingsworth
FORUM ADMINISTRATOR / JAZZ DEVELOPER Jan 04 '13, 2:06 p.m.kavita herur
Jan 07 '13, 12:09 a.m.Millard Ellingsworth
FORUM ADMINISTRATOR / JAZZ DEVELOPER Jan 07 '13, 12:28 a.m.Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Jan 07 '13, 4:40 a.m.