ValidateModel.dss
This script is called when a user selects a Master Template from a prepared Master Template list. The purpose of this script is to validate that the Master Template selected by user is a part of the prepared Master Template list. In this case, the script writes the path to the Master Template in a session variable with the following keys:
-
Key defined by the parameter KeyModel of the script
-
Key defined by human readable representation of the Master Template
-
Key defined by the parameter KeyLabel of the script
The default behavior implemented in the script is that it validates the parameter ModelRef against the provided XMLFile. If it is valid, it will set some session variables. Other forms of authorization can be implemented by adapting the script.
Parameters
The script is called with the following parameters:
-
ModelRef: The Master Template reference to be validated.
-
XMLFile: The xml file containing the list of Master Templates that the user is allowed to run.
-
KeyModel: The key that can be used to store the Master Template name in the session.
-
KeyLabel: The key that can be used to store the label in the session.