KB Article #178163

STWC: Remove the "Mailbox" button from the ST Web Client for specific group of users.

Problem

Sometimes the business would require only specific users to have access to the Mailbox functionality in ST Web Client. One way to cover this use case could be to create a separate HTML template where the "Mailbox" button is unavailable.


Resolution

The changes below must be done on each of the ST servers in the environment.


In order to remove the "Mailbox" button in a separate HTMl template follow the instructions below:


Navigate to $FILERIVEHOME/share/ftdocs/html/skin.


Make a copy of the "ric" folder:


cp -r ric/ ric_no_mailbox/


Navigate to $FILERIVEHOME/share/ftdocs/html/skin/ric_no_mailbox/ and open the file skin.conf with a text editor.


Edit the description line from:


description "ST Web Client"


to


description "ST Web Client No MailBox"


and save the changes. Now you can select the new custom template (with the name "ST Web Client No MailBox") from the "HTML Template" field (wherever it is an option).


Navigate to $FILERIVEHOME/share/ftdocs/html/skin/ric_no_mailbox/C/config.


Copy the default.config.json file to the $FILERIVEHOME/share/ftdocs/html/skin/ric_no_mailbox/custom directory:


cp default.config.json $FILERIVEHOME/share/ftdocs/html/skin/ric_no_mailbox/custom/


Navigate to $FILERIVEHOME/share/ftdocs/html/skin/ric_no_mailbox/custom and rename the default.config.json file to stwebclient.config.json:


cd $FILERIVEHOME/share/ftdocs/html/skin/ric_no_mailbox/custom
mv default.config.json stwebclient.config.json


Open the stwebclient.config.json file with a text editor.


Delete all of the lines and paste the following (only the below should be visible in the stwebclient.config.json file):


{
    "features": {
        "viewsConfiguration": {
            "enabled": true
        }
    },
    "views": {
        "defaultView": "allFiles",
        "mailbox": {
            "enabled": false
        },
        "allFiles": {
            "enabled": true
        }
    }
}


and save the changes.


Some of the files in the new template will still contain paths, pointing to files located in the original ric directory, so we are going to change it to the new path. For this purpose navigate to the $FILERIVEHOME/share/ftdocs/html/skin/ric_no_mailbox/C/ directory and run the following command:


find . -type f -exec sed -i "s|html/skin/ric|html/skin/ric_no_mailbox|g" {} \;


Restart the HTTP service on the server.


Assign the users who should not have access to the mailbox functionality to the new template.