/** * Returns <code>true</code> if any of the configured realms' * {@link Realm#hasRole(org.apache.shiro.subject.PrincipalCollection , String)} call returns <code>true</code>, * <code>false</code> otherwise. */ public boolean hasRole(PrincipalCollection principals, String roleIdentifier) { assertRealmsConfigured(); for (Realm realm : getRealms()) { if (realm.hasRole(principals, roleIdentifier)) { return true; } } return false; }