/** @see javax.jcr.security.AccessControlManager#hasPrivileges(String, Privilege[]) */
 public boolean hasPrivileges(String absPath, Privilege[] privileges)
     throws PathNotFoundException, RepositoryException {
   checkInitialized();
   checkValidNodePath(absPath);
   if (privileges == null || privileges.length == 0) {
     // null or empty privilege array -> return true
     log.debug("No privileges passed -> allowed.");
     return true;
   } else {
     Path p = getPath(absPath);
     return compiledPermissions.hasPrivileges(p, privileges);
   }
 }
  /**
   * @see org.apache.jackrabbit.api.security.JackrabbitAccessControlManager#hasPrivileges(String,
   *     Set, Privilege[])
   */
  public boolean hasPrivileges(String absPath, Set<Principal> principals, Privilege[] privileges)
      throws PathNotFoundException, RepositoryException {
    checkInitialized();
    checkValidNodePath(absPath);
    checkPermission(absPath, Permission.READ_AC);

    if (privileges == null || privileges.length == 0) {
      // null or empty privilege array -> return true
      log.debug("No privileges passed -> allowed.");
      return true;
    } else {
      Path p = getPath(absPath);
      CompiledPermissions perms = acProvider.compilePermissions(principals);
      try {
        return perms.hasPrivileges(p, privileges);
      } finally {
        perms.close();
      }
    }
  }