Conditional Fields: when user-role = admin

In the blueprint of a page I have a field/section, where only users with the role “admin” should be able to change the contents.

Is it possible to use the “when” condition to hide this field (or section) for other roles?

I know, that permissions are the normal way to get this. But I want to know if a role can be used to hide a field/section. May be this would be less secure, but I would not need this safeness.

No, there is no way to show or hide fields based on user role.

Thank you for your answer, even though it doesn’t really help me.

Currently, the only way to achieve this would be to use different blueprints based on user role.

Thanks for the link, but then I would have to maintain an additional blueprint for each role to be specifically distinguished.
That doesn’t make sense in my context.

You only need two:

One for the admin role, one for the rest.

Thanks, but two blueprint files are more than one in which all normal changes have to be maintained in parallel.
And I want to avoid something like that to avoid inconsistencies in the content files.

Well, currently there is no other way (unless you store this admin-only content somewhere else) and there would be ways to prevent inconsistencies with clever use of reusable blueprint parts, but hey, you can do what you want.

1 Like