/** Does the current Subject have a role(a Principal) that equates to one of the role names. @see #doesUserHaveRole(Principal, Set) @param principal - ignored. The current authenticated Subject determines the active user and assigned user roles. @param role - the application domain role that the principal is to be validated against. @return true if the active principal has the role, false otherwise. */ public boolean doesUserHaveRole(Principal principal, Principal role) { boolean hasRole = false; RoleGroup roles = this.getCurrentRoles(principal); hasRole = doesRoleGroupHaveRole(role, roles); return hasRole; }
/** Does the current Subject have a role(a Principal) that equates to one of the role names. @see #doesUserHaveRole(Principal, Set) @param principal - ignored. The current authenticated Subject determines the active user and assigned user roles. @param role - the application domain role that the principal is to be validated against. @return true if the active principal has the role, false otherwise. */ public boolean doesUserHaveRole(Principal principal, Principal role) { boolean hasRole = false; RoleGroup roles = this.getCurrentRoles(principal); hasRole = doesRoleGroupHaveRole(role, roles); return hasRole; }
hasRole = doesRoleGroupHaveRole(role, roles); if( trace ) log.trace("hasRole("+role+")="+hasRole);
hasRole = doesRoleGroupHaveRole(role, roles);