What |
Permissions.xml |
---|---|
Config group |
RegionConfigFiles |
Required |
no |
Description |
Set permissions for user groups |
schema location |
What |
UserGroups.xml |
---|---|
Config group |
RegionConfigFiles |
Required |
no |
Description |
Define user groups |
schema location |
General
Permissions can be added to the FEWS configuration to allow users (user groups) to access Explorer tasks, Data Editor functions, Filters, etc.. Permissions can be optionally configured in the following configuration files:
- Explorer.xml
- Use of the data editor window
- Running forecasts
- TimeSeriesDisplayConfig.xml
- Add/Edit values in the data editor window
- Add/Edit lables in the data editor window
- Add/Edit comments in the data editor window
Permissions are to be configured as follows
- Configure optional permission names in any of the above described configuration files.
- Create the permissions in the permissions configuration file (Permissions 1.00 default.xml) and configure usergroup names which should have access to the permissions.
- Create the usergroups in in the usergroup configuration file (Usergroups 1.00 default.xml) and assign them user names.
Configure optional permission names
This can be achieved by adding the optional permission tag to the configuration and give it a self-describing name.
Create the permissions configuration file
When available on the file system, the name of the XML file is for example:
Permissions 1.00 default.xml
Permissions Fixed file name for the permissions configuration
1.00 Version number
default Flag to indicate the version is the default configuration (otherwise omitted).
Figure 3 Elements in the Permissions configuration
<?xml version="1.0" encoding="UTF-8"?> <permissions xmlns="....."> <permission id="AllowDataEditor"> <userGroup id="Hydroloog"/> <userGroup id="Veldmedewerker"/> </permission> <permission id="AllowManualForecast"> <userGroup id="Hydroloog"/> </permission> <permission id="AllowLabelEditor"> <userGroup id="Hydroloog"/> </permission> <permission id="AllowCommentEditor"> <userGroup id="Hydroloog"/> <userGroup id="Veldmedewerker"/> </permission> <permission id="AllowValueEditor"> <userGroup id="Hydroloog"/> </permission> </permissions>
Permission
Unique name of the permission
Usergroup
Id of each uergroup that is granted the given permission
create the user groups
When available on the file system, the name of the XML file is for example:
Usergroups 1.00 default.xml
Usergroups Fixed file name for the user group configuration
1.00 Version number
default Flag to indicate the version is the default configuration (otherwise omitted).
Figure 4 Elements in the Usergroups configuration
<?xml version="1.0" encoding="UTF-8"?> <userGroups xmlns="...."> <userGroup id="Veldmedewerker"> <user id="Stephan Zuiderwijk" /> <user id="Marc van Dijk"/> </userGroup> <userGroup id="Hydroloog"> <user id="Toon van Peel"/> </userGroup> </userGroups>
Usergroup
Base tag for a usergroup configure one for each user group. Usergroups can contain other usergroups.
User
Name of the user that belongs to the usergroup. Users can be placed in multiple usergroups.
Example of permissions in the Explorer XML and TimeSeriesDisplayConfig XML file.
.... <explorerTask name="Data Editor"> <iconFile>%FEWSDIR%/icons/table.gif</iconFile> <mnemonic>E</mnemonic> <arguments>table</arguments> <taskClass>nl.wldelft.fews.gui.plugin.timeseries.TimeSeriesDialog</taskClass> <toolbarTask>false</toolbarTask> <menubarTask>true</menubarTask> <accelerator>ctrl E</accelerator> <permission>AllowDataEditor</permission> </explorerTask> ....
.... <generalDisplayConfig> <convertDatum>true</convertDatum> <valueEditorPermission>AllowValueEditor</valueEditorPermission> <labelEditorPermission>AllowLabelEditor</labelEditorPermission> <commentEditorPermission>AllowCommentEditor</commentEditorPermission> </generalDisplayConfig> ....