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

sai krishna10
Giga Guru

Instead of using condition block use the script block and return true.

sai krishna10
Giga Guru

Instead of condition block Use the script block and place the code there and return true

AkshayPunekar31
Mega Expert

Hi,

You can use scripted filter.

Follow the steps below:

1. write a script include and write the code there.

2. In your UI Policy's condition part call the script include.

Eg:-

javascript:function_name()


Please mark reply as Helpful/Correct, if applicable. Thanks!

Warm Regards,

Akshay Punekar

find_real_file.png

www.dxsherpa.com

write ondemand script include.