I have a field in a content type that I only want to be visible to users within a specific role. This appears to be possible based on the Field Visibility Settings, Conditional, User Context, Roles/RoleNameInClause and/or Roles/RoleName.
I couldn’t find any documentation on the operator I should choose and the proper syntax for the value to test against.
Anyone done this before or know the proper configuration?
Hi,
We’ve done that for a couple of field.
Here is what we did:
In the field visibility properties choose the rule type “Conditional” and in the variable field, select “User Context/Roles/RoleName”.
Hope that help,
Guillaume
I got the Roles/RoleName working with the LIKE operator. I was more curious about Roles/RoleNameInClause.
Roles/RoleNameInClause formats the role list as a string of comma separated names. This can be used in the conditional to, but would be slightly less efficient. It could also be used in a manual WHERE clause in an XML application (which are not generally used anymore.)