public boolean checkRole (Principal role, Principal runAsRole, Group roles)
public boolean checkRole (String roleName, Principal runAsRole, Group roles)
    public boolean checkRole (Principal role, Principal runAsRole, Group roles)    {        //check if this user has had any temporary role pushed onto        //them. If so, then only check if the user has that role.        if (runAsRole != null)        {            return (role.equals(runAsRole));        }        else        {            if (roles == null)                return false;                        return roles.isMember (role);        }            }