applying UI Policy only for specific user group

ody
Tera Contributor

Hi,

how to write a filter condition based on current user group membership when applying UI policy.
the filter condition is: if current user is member of group X, then do apply some UI policy

I found a code snippet:
if(gs.getUser().isMemberOf(group_X_sys_id)){
//Do something...
}

but how do I put the code into the condition filter box?

 

 

Thank you

16 REPLIES 16

ody
Tera Contributor

I have created the script includes (see attached), but still cannot find my script on condition builder (see attached).

please advise, how to call the script from condition builder of UI Policy?

Hi 

in Conditions :- "your_field_name" is "here write the condition of javascript".

In the third parameter of your condition tab.

 

Mark Correct if it helps.

Warm Regards,

Omkar Mone

find_real_file.png

www.dxsherpa.com

Hi,

Instead of UI policy use client script. 

What action you want to perform if the script include returns true?

ody
Tera Contributor

my goal is:

 

if current user is member of group X 

then set the textbox to read-only mode

else set the textbox to writable mode

 

Now, I am confuse whether to use UI Policy or Client Script to achieve my goal.