Iterating through project roles

Posts: 2
Joined: Mon Oct 16, 2017 10:03 am

Iterating through project roles

Postby jriimala » Mon Oct 16, 2017 10:30 am

Need help how to read specific project role value from variable. Below function returns mutable Map of IContextId and Collection of roles based on ... textId...-

Trying to find out, if variable has project_assignable role in it and if so then doing something.

In this case variable can have project_user project_assignable project_reviewer project_approver in it, but would like to learn how to iterate $r variable so that I could check specific value from it.

#set($role = $securityService.getContextRolesForUser($,$prj.getContextId()))

#foreach($r in $role)

Pls provide help with example, thx in advanced.

Posts: 181
Joined: Thu Nov 05, 2009 3:24 pm

Re: Iterating through project roles

Postby martins » Thu Nov 30, 2017 2:16 pm

If you just want to check if a user has a certain role you can do it like this

Code: Select all

   ## code for all project developers
   ## code for all project users
   ## code for all other users


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 2 guests