Wish to use:
system.security.getRoles()
and another tag reference on the Visible property of a input box something like:
toInt(Tag({Root Container.TagPath}+"LoggedIn"))=0
||
"Foreman" in system.security.getRoles()
If either or both are true enable visible.
How do I wrap the python to work here?
You can use the lookup function to see if they have a certain role:toInt(Tag({Root Container.TagPath}+"LoggedIn"))=0
||
lookup({[System]Client/User/RolesDataSet}, "Foreman", "", 0, 0) != ""
Or use indexOf on the RolesString tag
toInt(Tag({Root Container.TagPath}+"LoggedIn"))=0
||
indexOf({[System]Client/User/RolesString},"Rolename")!=-1
Just be careful on that one if you use Foreman in some other role like ForemanSup.
Yeah, I was just about to give the caveat, but you beat me to it!