Hiding file types for certain users or groups

Login as superuser, open the control panel and locate the ID of the group or user you want to configure the filter for. In most browsers, when you keep the cursor over a link, you will see the URL in the browser's status bar. You can use that to easily find the ID of a particular group or user. In most Web File Share control panel URLs, the group ID is marked as "gid" and user ID as "uid".

Open the file "/path-to-WebFileShare/customizables/config.php" in a text or PHP editor.

Add the following line inside the file, before its last line ("?>"):

 $config['app']['custom_hidden_files']['groups']['123'] = array("*.dwg", "*.DWG", "*.bak", "*.BAK");

The above line will hide the file types "dwg" and "bak" from all the users in the group with ID 123.

Please note that the extension is case sensitive, that is why are set twice in the example.

$config['app']['custom_hidden_files']['users']['321'] = array("*.ai", "*.AI", "*.dmp", "*.DMP");

The above line will hide the file types "ai" and "dmp" from a particular user with the ID 321.

$config['app']['custom_hidden_files']['roles']['456'] = array("*.jpg", "*.JPG");

The above line will hide the "JPEG" images files from all users with the role ID "456".

You can add as many lines as you need, for different groups and/or users. You can also add as many extensions as you need to a configuration line.

 

Attached Files
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Name
Email
Security Code Security Code
Related Articles RSS Feed
File indexing and full-text searching
Viewed 2413 times since Wed, Mar 5, 2014
ImageMagick thumbnail generation and image preview
Viewed 1490 times since Wed, Mar 5, 2014
Character encoding
Viewed 1338 times since Wed, Mar 5, 2014
File Encryption
Viewed 1310 times since Wed, Mar 5, 2014
Accessing WebDAV
Viewed 1479 times since Wed, Mar 5, 2014
MENU