You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to restrict access for users by calling their specific roles via page composer?

Summary:


Is it possible to restrict users from accessing certain functionalities by calling out their specific roles?
Example.
User1 has role 1 2 3
User2 has role 1 2

Is there an expression that would only hide certain functions for user2 while not affecting user1
Code Snippet (add any code snippets that support your topic, if applicable):

Attempted to use the following code, but it is causing the sandbox to crash.
#{!(securityContext.userInAllRoles['Role1,Role2'] and securityContext.userGrantedRoles.size() == 2)}

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!