Issue Description
In a domain security file's principalExpression element, the typical example checks to see if a user's role is in a list of the roles provided, like:
authentication.getPrincipal().getRoles().any{ it.getRoleName() in ['ROLE_T_1, ROLE_T_2, ROLE_T_3, ROLE_T_99999'] ...
See https://community.jaspersoft.com/documentation/tibco-jasperreports-server-security-guide/v7/domain-and-security-recommendations for reference
But some users might want to check to see if any of a user's roles simply contain ROLE_T, for simplicity.
Resolution
It is possible to use this expression in your principalExpression element:
authentication.getPrincipal().getRoles().contains('ROLE_T')
If any of the users's roles contain ROLE_T as part of the rolename, the expression will return true.
Ref. Case 01854677/strong>
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now