For Revolver version 3+
Revolver can execute a number of scripts when a session starts. This allows users to setup their environment as required.
The following scripts will be executed in this order, if they exist. Normally an error will be raised if the user attempts to execute a script which does not exist, but for initialisation scripts, if the script doesn't exist, it will not raise an error.
The first script to be executed is the script named
init. This script will be executed for all users.
The users roles will be enumerated and the init script for each role by lowercase name (without the domain) will be attempted to be executed. So if the user belongs to the
sitecore\Maintenance roles, then scripts by name
init-maintenance will be executed.
The role init scripts are executed for each user in that role when they start a new session.
The last init script will be the users init script, given by the users lowercase name without the domain. So if the users name is
sitecore\Dean then the
init-dean script will be executed.
Let's take the above examples and combine them. For the user
sitecore\dean who belongs to the
sitecore\Maintenance roles, the following scripts will be executed in order:
Init scripts do not need to be found in a specific script locator. All locators will be searched. As normal, scripts must be uniquely named across all providers. So you cannot have a script named
init on the file system and also in the core DB. There can only be a single script named