In v2020.1+, Exago recommends using the permissions model built-in to the Storage Management system instead of this code example.
By utilizing the folder logic within Roles, you can control the folders that users have access to.
'Child Folder' no longer appears inside 'Parent Folder'
In this example we will be hiding the folder named 'Child Folder'.
The following is a breakdown of each line:
- Get the Role by name (e.g. 'admin').
- Activate the Role.
- Set the Include All Folders flag to true. (See note below)
- Create a new Folder Access entry for the role.
- Set the name to the path name of the folder you wish to hide.
Setting Include All Folders to False will have a reverse effect and cause only the specified folder to display. The permissions of parent folders will be inherited by all child folders.