{"action":"created","issue":{"url":"https://api.github.com/repos/Studio-42/elFinder/issues/1403","repository_url":"https://api.github.com/repos/Studio-42/elFinder","labels_url":"https://api.github.com/repos/Studio-42/elFinder/issues/1403/labels{/name}","comments_url":"https://api.github.com/repos/Studio-42/elFinder/issues/1403/comments","events_url":"https://api.github.com/repos/Studio-42/elFinder/issues/1403/events","html_url":"https://github.com/Studio-42/elFinder/issues/1403","id":155495417,"number":1403,"title":"Cannot hide directories under root volume with bind","user":{"login":"paulcanning","id":1275739,"avatar_url":"https://avatars.githubusercontent.com/u/1275739?v=3","gravatar_id":"","url":"https://api.github.com/users/paulcanning","html_url":"https://github.com/paulcanning","followers_url":"https://api.github.com/users/paulcanning/followers","following_url":"https://api.github.com/users/paulcanning/following{/other_user}","gists_url":"https://api.github.com/users/paulcanning/gists{/gist_id}","starred_url":"https://api.github.com/users/paulcanning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulcanning/subscriptions","organizations_url":"https://api.github.com/users/paulcanning/orgs","repos_url":"https://api.github.com/users/paulcanning/repos","events_url":"https://api.github.com/users/paulcanning/events{/privacy}","received_events_url":"https://api.github.com/users/paulcanning/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-18T13:01:04Z","updated_at":"2016-05-18T13:37:03Z","closed_at":null,"body":"I am trying to hide certain folders under the root volume using a bind callback on the `parents` command.\r\n\r\nI am using the following code:\r\n\r\n```\r\npublic function check_access($cmd, &$result, $args, $elfinder)\r\n\t{\r\n\t\t$user_jobs = $this->job_model->get_jobs_by_user($this->aauth->get_user_id());\r\n\r\n\t\t$job_numbers = array();\r\n\r\n\t\tforeach ($user_jobs as $job)\r\n\t\t{\r\n\t\t\t$job_numbers[] = $job->job_number;\r\n\t\t}\r\n\r\n\t\tforeach ($result['tree'] as $i => $tree)\r\n\t\t{\r\n            if ($i > 0) // ignore the first entry, as it is the root volume\r\n            {\r\n\t            if (in_array($tree['name'], $job_numbers))\r\n\t            {\r\n\t\t            $result['tree'][$i]['hidden'] = 0;\r\n\t            }\r\n\t            else\r\n\t            {\r\n\t\t            $result['tree'][$i]['hidden'] = 1;\r\n\t            }\r\n            }\r\n\t\t}\r\n\t}\r\n```\r\n\r\nIt is successfully setting the value, but all folders are visible under the root volume, even ones with `hidden` set to `0`.\r\n\r\nSeems like elFinder is not taking this options into account?\r\n\r\nOptions like `read`, `write` and `locked` work fine, but I want to hide the folders entirely."},"comment":{"url":"https://api.github.com/repos/Studio-42/elFinder/issues/comments/220027992","html_url":"https://github.com/Studio-42/elFinder/issues/1403#issuecomment-220027992","issue_url":"https://api.github.com/repos/Studio-42/elFinder/issues/1403","id":220027992,"user":{"login":"StudioJunkyard","id":841740,"avatar_url":"https://avatars.githubusercontent.com/u/841740?v=3","gravatar_id":"","url":"https://api.github.com/users/StudioJunkyard","html_url":"https://github.com/StudioJunkyard","followers_url":"https://api.github.com/users/StudioJunkyard/followers","following_url":"https://api.github.com/users/StudioJunkyard/following{/other_user}","gists_url":"https://api.github.com/users/StudioJunkyard/gists{/gist_id}","starred_url":"https://api.github.com/users/StudioJunkyard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StudioJunkyard/subscriptions","organizations_url":"https://api.github.com/users/StudioJunkyard/orgs","repos_url":"https://api.github.com/users/StudioJunkyard/repos","events_url":"https://api.github.com/users/StudioJunkyard/events{/privacy}","received_events_url":"https://api.github.com/users/StudioJunkyard/received_events","type":"User","site_admin":false},"created_at":"2016-05-18T13:37:03Z","updated_at":"2016-05-18T13:37:03Z","body":"You can hide folders using the below in the connector.php file inside the roots array, the `folder|to|hide` is the list of folders to hide using the pipe character as a deliminator:\r\n```PHP\r\n            'attributes'=>array(\r\n                array(\r\n                    'pattern'=>'!^/folder|to|hide!',\r\n                    'hidden'=>true\r\n                )\r\n            )\r\n```"}}