public boolean isUserInRole ( String role ) { if ( ! isEnabled ( ) ) { throw new IllegalStateException ( "security module is disabled" ) ; } checkInit ( ) ; SecurityProvider securityProvider = context . getSecurityProvider ( ) ; boolean contained = role == ALL_ROLE || securityProvider . isUserInRole ( role ) ; LOGGER . debug ( "isUserInRole returns {} for role {}" , contained , role ) ; return contained ; }
Checks whether the current user posses the provided role