I am setting the permission for the editors.
In the files tab
Is it possible to hide all folders and files excepted the “documents” folder, I created and where I save all documents (pdf, images) to be linked from the web pages?
It’s dangerous that editors go into those folders oder upload file in root. They must only be able to access and upload files in the documents folder
I just observed that
with directory_list, I can hide thos folder. But would have a way to hide all excepted a dedicated folder?
You can achieve this by creating a media source to your desired folder and only give your editors access to this media source (and prohibiting the Filesystem one).
First, give your Admin(s) access to the File System Media Source (on the Access Permissions tab when editing the Media Source). That will hide all files from anyone who is not in that group,
Then, create a new Media Source (in Media → Media Sources) called “Documents” that has the Documents folder as its root (basePath, and baseUrl). On its “Access Permissions” tab, connect it to a user group containing your editors. They should be able to see the Documents folder and below, but nothing else.
Test to make sure they can’t browse upward in the file browser.
It helps to use another browser where you’re not logged in to the Manager for testing the editors’ permissions. You may need to clear the cache, Manage → Log out all users, and/or Manage->Flush your permissions, before testing to see any changes.