You are here

class elFinderDrupalACL in elFinder file manager 6.2

Same name and namespace in other branches
  1. 7.3 inc/elfinder.drupalfs.acl.inc \elFinderDrupalACL
  2. 7.2 inc/elfinder.drupalfs.acl.inc \elFinderDrupalACL

Hierarchy

Expanded class hierarchy of elFinderDrupalACL

File

inc/elfinder.drupalfs.acl.inc, line 3

View source
class elFinderDrupalACL {
  public function fsAccessPublic($attr, $path, $data, $volume) {

    /*if ($volume->name() == 'localfilesystem') {
        return strpos(basename($path), '.') === 0
          ? !($attr == 'read' || $attr == 'write')
          : $attr == 'read' || $attr == 'write';
      }*/
    if (strpos(basename($path), '.') === 0 && $attr == 'hidden') {
      return true;
    }

    /* Hiding thumbnail folder */
    if (strstr($path, DIRECTORY_SEPARATOR . variable_get('elfinder_settings_thumbnail_dirname', 'tmb')) && $attr == 'hidden') {
      return true;
    }
    if (strstr($path, DIRECTORY_SEPARATOR . '.quarantine') && $attr == 'hidden') {
      return true;
    }
    if ($attr == 'read') {
      return true;
    }
    if ($attr == 'write') {
      return true;
    }

    /* if ($attr == 'write' && user_access('write public files')) {
            return true;
          }
    		
          if ($attr == 'locked' && !user_access('write public files')) {
            return true;
          }*/
    return false;
  }
  public function fsAccessPrivate($attr, $path, $data, $volume) {
    if (strpos(basename($path), '.') === 0 && $attr == 'hidden') {
      return true;
    }

    /* Hiding thumbnail folder */
    if (strstr($path, DIRECTORY_SEPARATOR . variable_get('elfinder_settings_thumbnail_dirname', 'tmb')) && $attr == 'hidden') {
      return true;
    }
    if (strstr($path, DIRECTORY_SEPARATOR . '.quarantine') && $attr == 'hidden') {
      return true;
    }
    if ($attr == 'read') {
      return true;
    }
    if ($attr == 'write') {
      return true;
    }

    /* if ($attr == 'write' && user_access('write public files')) {
            return true;
          }
    		
          if ($attr == 'locked' && !user_access('write public files')) {
            return true;
          }*/
    return false;
  }
  public function fsAccessUnmanaged($attr, $path, $data, $volume) {
    return strpos(basename($path), '.') === 0 ? !($attr == 'read' || $attr == 'write') : $attr == 'read' || $attr == 'write';
    if (strpos(basename($path), '.') === 0 && $attr == 'hidden') {
      return true;
    }

    /* Hiding thumbnail folder */
    if (strstr($path, DIRECTORY_SEPARATOR . variable_get('elfinder_settings_thumbnail_dirname', 'tmb')) && $attr == 'hidden') {
      return true;
    }
    if (strstr($path, DIRECTORY_SEPARATOR . '.quarantine') && $attr == 'hidden') {
      return true;
    }
    if ($attr == 'read') {
      return true;
    }
    return false;
  }

}

Members