Fix hasPrivilege method.