Configuring control access
- 1. Select the control in the designer.
- 2. Open the Show Permissions tab in the Properties.
- 3. Configure the desired permissions of the individual user groups; the following options are available for this:
Allow: The access method is permitted for the user group.
Disallow: The access method is not permitted for the user group.
Inherit: The permission of the user group is derived from the higher-level parent control (container control: View, Content, User Control, Container, Region or User Control Host).
Special cases
Access methods of a view
Operate and Observe are permitted for a view as standard (default = Allow). Since the view –as the entry point to the HMI application –is always the highest container control, the Inherit option is not available.
User is a member of several user groups
The following rules apply if the user is a member of several user groups:
- If Allow is configured for at least one user group, the access method is permitted for the user (Allow).
- If Disallow is configured for at least one user group and Allow is not configured for any user group, the access method is not permitted for the user (Disallow).
- If Inherit is configured for all user groups, the permission is derived from the higher-level container control (Inherit).
Inherit with other access rights
Apart from Operate and Observe, a control can define other access rights (for example, "viewDetails" with EventGrid). Here too, the rights setting of the respective level is checked starting from the respective control. If a control has defined Allow or Disallow here, then the user (as described above) has the configured right. If Inherit is defined here, the higher-level parent control is queried for an explicit setting.
It can also be the case that this higher-level parent control does not know the access right. For example, a fictitious right "configure" is discussed here that is not known to the View. It is assumed that a ControlTypeA exists that knows "configure" and has set defaultValueInternal to true/Allow. ControlTypeB also knows "configure", but has set defaultValueInternal to zero.
Sample 1:
- Desktop (TcHmiView) contains:
- MainContainer (TcHmiContainer) contains:
- myControlA (ControlTypeA) "configure" to Allow. Contains:
- myControlB (ControlTypeB) "configure" to Disallow.
Disallow acts on myControlB as its own configuration is checked first.
Sample 2:
- Desktop (TcHmiView) contains:
- MainContainer (TcHmiContainer) contains:
- myControlA (ControlTypeA) "configure" to Allow. Contains:
- myControlB (ControlTypeB) "configure" to Inherit.
Allow acts on myControlB as its own configuration has no definition and the parent control has a direct configuration.
Sample 3:
- Desktop (TcHmiView) contains:
- MainContainer (TcHmiContainer) contains:
- myControlA (ControlTypeA) "configure" to Inherit. Contains:
- myControlB (ControlTypeB) "configure" to Inherit.
myControlB and the parent control have no configuration of their own and neither TcHmiContainer nor TcHmiView know "configure". Therefore the defaultValueInternal of the ControlTypeA is used as it is the last control in the parent-child relationship to which "configure" is known and which defines a value (true/false or Allow/Disallow).