Upgrading to S-Filer Portal 4.20.0
This document describe the required steps to upgrade to S-Filer Portal 4.20.0.
Modifying the wrapper.conf file
The wrapper.conf
file has been updated to change the librairies loading order.
Before
wrapper.java.classpath.1=lib/*.jar
wrapper.java.classpath.2=etc
wrapper.java.classpath.3=conf
wrapper.java.classpath.4=ext/lib/*.jar
After
wrapper.java.classpath.1=ext/lib/*.jar
wrapper.java.classpath.2=lib/*.jar
wrapper.java.classpath.3=etc
wrapper.java.classpath.4=conf
The gateway wrapper.conf
file has not been modified.
Importing the notification templates in the database
Imagine a directory structure similar to this one:
# ls -al etc/mail
total 0
drwxrwxr-x. 5 sfiler sfiler 64 Aug 16 13:52 .
drwxrwxr-x. 4 sfiler sfiler 119 Feb 22 2021 ..
drwxr-xr-x. 7 sfiler sfiler 82 Aug 16 13:52 my-theme-1
drwxr-xr-x. 7 sfiler sfiler 82 Aug 16 13:52 my-theme-2
drwxrwxr-x. 7 sfiler sfiler 82 Feb 22 2024 notification
#
Notifications that were originally on the file system are now stored in the database. The import process involves taking the notification templates from the file system and importing them into the database. To do this, you need to take the following steps:
Step 1: Run the following command to import the notification templates from the file system to the database:
This command is reversible. Themes imported into the database can then be deleted from the web interface. We recommend using this option unless you wish to cover a specific use case.
./sfiler-config-cli.sh -l my-user -p my-password -cf "conf/sfiler.conf" import-notification-themes -p "etc/mail" -all
This run, using the data structure outlined above, will import all notification themes located in the etc/mail
directory into the database and produce the following console output:
# ./sfiler-config-cli.sh -l my-user -p my-password -cf "conf/sfiler.conf" import-notification-themes -p "etc/mail" -all
The import notification themes command ran successfully. See the details below for the results.
The following themes have been imported.
notification
my-theme-1
my-theme-2
#
Once the command has been executed, the notification themes will be available in the database and can be used via the web interface.
The content of notifications can be modified via the web interface to suit your needs. Changes made in the web interface will not be reflected in the file system, which is no longer relevant in this version.
Step 2: Run the following command to adjust the groups configuration:
The groups
configuration could have an associate notification template that was originally identified by its folder name on the file system. To adjust the configuration, you must run the following command:
As the notification themes are no longer on the file system, we want to run a command that will be able to make the link between its previous name on the file system and the database entry. To do this, you need to run the following command:
./sfiler-config-cli.sh -l my-user -p my-password -cf "conf/sfiler.conf" migrate-themes --dry-run
Note that the --dry-run
parameter allows you to simulate the migration of notification themes without actually migrating them. If an error is detected, we recommend that you note the problematic groups and proceed to correct their respective notification themes using the web interface.
At the end of this step, notification theme migration will be completed. You can validate one of the groups for which a notification theme previously existed, to ensure that the migration has been completed successfully.
Revision of imported models
The notification format has been modified to allow greater flexibility in template creation. The previous version used a static text substitution mechanism specific to the S-Filer Portal solution. The new version uses the [MVEL] library (https://github.com/mvel/mvel) to generate notification templates. This library is widely used in the industry and offers great flexibility in the creation of notification templates.
For example, the following template:
<div class="salutations">
<h1>Hello <b>:userfullname (:username)</b>, </h1>
</div>
<div id="container">
<p class="subtitle">
As an authorized user of the domain <b>:domainname</b>, please note that the user <b>:sendername</b> sent to your attention the file
<b>:filename</b> and is now available in your personal inbox.
</p>
<p>
To access this file, please go to the following URL: <b><a href=":url">:url</a></b>
</p>
</div>
:messagetorecipients
Will be replaced by:
<div class="salutations">
<h1>Hello <b>@{userfullname} (@{username})</b>, </h1>
</div>
<div id="container">
<p class="subtitle">
As an authorized user of the domain <b>@{domainname}</b>, please note that the user <b>@{sendername}</b> sent to your attention the file
<b>@{filename}</b> and is now available in your personal inbox.
</p>
<p>
To access this file, please go to the following URL: <b><a href="@{url}">@{url}</a></b>
</p>
</div>
@{messagetorecipients}
It is essential to validate that the import process has worked properly and that the templates originally on the file system have been imported correctly. To do this, you need to use the administrative interface and browse the various notifications in the languages used by your S-Filer Portal instance.