public function elFinderDrupalACL::fsAccessPublic in elFinder file manager 8.2
File
- src/
Controller/ elFinderDrupalACL.php, line 11 - elfinder ACL class
Class
- elFinderDrupalACL
- @file elfinder ACL class
Namespace
Drupal\elfinder\ControllerCode
public function fsAccessPublic($attr, $path, $data, $volume) {
$tmbdir = \Drupal::config('elfinder.settings')
->get('thumbnail.dirname');
$rootpath = drupal_realpath('public://');
if (strpos(basename($path), '.') === 0 && $attr == 'hidden') {
return TRUE;
}
/* Hiding thumbnail folder */
if (!empty($tmbdir) && strstr($path, DIRECTORY_SEPARATOR . $tmbdir) && $attr == 'hidden') {
return TRUE;
}
if (($path == "{$rootpath}/.quarantine" || $path == "{$rootpath}/js" || $path == "{$rootpath}/css" || $path == "{$rootpath}/php") && $attr == 'hidden') {
return TRUE;
}
if (strstr($path, "{$rootpath}/config_") && $attr == 'hidden') {
return TRUE;
}
if ($attr == 'read') {
return TRUE;
}
if ($attr == 'write') {
return TRUE;
}
return FALSE;
}