Role assignment (hwm_update_user_roles)
This utility allows assigning of roles to users in specified clients. It is stored in the bin subdirectory of the ProcMan installation. For to start it, change in the directory where ProcMan is installed (with cd command in the command window or by setting the work directory in a scheduler) and execute the command:
Windows:
Unix:
In the execution command replace the <input_file> with the file name (including an absolute or relative path) of the input file containing the user information and the <configuration_id> with a valid configuration id of the required configuration from the configuration file etc/hwm_update_user_roles_config.php. Take care that the configuration id is case sensitive so it has to be tipped exactly like it is specified in the configuration file.
The input file has to be a plain text file in comma separated format containing the role assignment information. Each line of the file has to represent the information about one assignment of a role to a user in a client. Thus each line has to contain a user id, a role id and a client id.
Before the utility can be started the structure of the input file has to be described in the configuration file etc/hwm_update_user_roles_config.php of the ProcMan installation. Let us explain the content of the configuration file on an example:
The configuration parameter csv_delimiter specifies the delimiter of ids in the input file. In a comma separated file format it is normally either semicolon (;) or comma (,).
The configuration parameter csv_columns specifies the order of the three ids (user, client and role) in a line in the input file. It must contain the three key words user, client and role in the string value. Actually the value string can contain any other text in the beginning, at the end and in between of the key words and the key words need not to be even separated. But for better readability we recommend to specify it as a string containing the key words separated by the delimiter specified in the configuration parameter csv_delimiter.
The configuration parameter csv_ignore_first_line specifies whether the very first line of the input file is handled as a header and thus ignored. Possible values are true or false.
In the mandatory section config the configurations for which the utility can be started has to be specified. There must be at least one configuration described in this section. Each configuration must have a unique configuration id specified. In the example above there are two configurations having configuration ids DEFAULT and EXAMPLE_CONFIG. When starting the utility, the required configuration has to be selected by tipping its configuration id in the -c parameter.
In each configuration each (none, one, several or all) of the above configuration parameters can be overridden, which has effect only for the configuration itself. If not overridden the configuration parameter values specified outside of the config section are used for the configuration.
Last updated