#{securityContext.userInRole['role1,role2,roleN']}
When the user has any of the roles, the expression returns True. When the user does not have any of the roles, the expression returns False.
#{securityContext.userInAllRoles['role1,role2,roleN']}
When the user has all the roles, the expression returns True. Otherwise, the expression returns False.
#{!securityContext.userInRole['ORA_PER_HUMAN_RESOURCE_SPECIALIST_JOB']}
This is a negative condition because of the !.
#{!securityContext.userInRole['ORA_PER_LINE_MANAGER_ABSTRACT'] or securityContext.userInRole['CUSTOM_ROLE']}
This is a negative condition referencing multiple roles.
#{securityContext.userInRole['ORA_PER_HUMAN_RESOURCE_SPECIALIST_JOB']}
This is a positive condition without the !.
#{securityContext.userInRole['ORA_PER_LINE_MANAGER_ABSTRACT'] or securityContext.userInRole['CUSTOM_ROLE']}
This is a positive condition referencing multiple roles.
#{securityContext.userName=='john.doe'}
When the login user is john.doe, returns True. Otherwise, returns False.
#{securityContext.userName=='Peter.Parker' or securityContext.userName=='John.Robert'}
When the logged in user is Peter Parker or John Robert, it will return True. Otherwise, it returns False.
#{securityContext.userName !='john.doe'}
When the login user is NOT john.doe, returns True. Otherwise, returns False.
This is a negative condition because of the !.
#{!securityContext.userInRole['PER_HUMAN_RESOURCE_SPECIALIST_JOB']}
This is a negative condition referencing multiple roles.
#{!securityContext.userInRole['PER_LINE_MANAGER_ABSTRACT'] or securityContext.userInRole['ABC_HR_MGR_LITE']}
When the login user is john.doe, returns True. Otherwise, returns False.
#{securityContext.userName=='john.doe'}
I hope this blog post was helpful for you. If you have any questions or feedback, please leave a comment below.