@ Override protected boolean showTagBody ( String roleName ) { boolean hasAnyRole = false ; Subject subject = getSubject ( ) ; if ( subject != null ) { // Iterate through roles and check to see if the user has one of the roles for ( String role : roleName . split ( StringPool . COMMA ) ) { if ( subject . hasRole ( role . trim ( ) ) ) { hasAnyRole = true ; break ; } } } return hasAnyRole ; }
Delimeter that separates role names in tag attribute