Catalog UI policy g_user.hasRoles()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2016 01:51 PM
I want certain variables in record producer hidden when the user has a role.
tried client UI policy , advanced view and run script but both when true and when false get same result for both roles users and non roled users...
Function onCondition() {
g_user.hasRoles();
}
then when set the action against the variable to not be visible
separately but similar issue
i also tried using g_user to populate the variables with default values and seems difficult to use so going to resort to having different record producers to different users , then tied to templates as the gs.user object seems more dependable but this doesn't seem great from a maintenance POV ?
i have read all I can find on various articles and other blogs and cheat sheets this just seems like it's not the user object itself but the way I'm using it !!?
thsnks for reading
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2016 07:28 AM
Thanks everyone I think I better understand now - especially the onCondition function , as I did try changing this to onLoad and all sorts (breaking stuff!)
i have a few options now and will try them all and come back to confirm and mark correct.
i Think I need to make a new thread for my other question , ta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2016 01:01 PM
I'm sorry I never came back and I cannot recall the correct answer but I know you were all very helpful thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2016 11:25 PM
Hi,
You can achieve this by apply ACL to the table.
In that ACL you have to mention the variable i.e. Tablename.Variablename and simply add required role to access those variable or use script as appropriate.
i hope this will help you.
Regards
Prabhat Kumar