En quoi pouvons-nous vous aider aujourd'hui ?

Using CheckAccess() with Embedded Mimic Parameters in Geo SCADA for Evaluating User Permissions

In Geo SCADA Expert, the CheckAccess() method can be used within mimic expressions to determine whether the currently logged-in user has a specific permission on a database object. This is particularly useful when you need to dynamically show or hide mimic objects based on user security rights.

Common permission codes include:

  • RD = Read
  • BRS = Browse
  • CTL = Control
  • OVR = Override
  • CFG = Configure
  • SEC = Security
  • ADM = System Administration

The CheckAccess() method returns:

  • True if the user has the specified permission
  • False if the user does not have the specified permission

Standard Visibility Control

A common use case is controlling an object's Visible property based on a user's permissions.

For example:

IIF(".Point with particular security settings.CheckAccess('CTL')", 1, 0)
In this example:
  • Visible is simply the property being animated.
  • CTL (Control) is used as an example permission code.
  • If the logged-in user has the specified permission, the expression returns 1 (visible).
  • Otherwise, it returns 0 (hidden).

The same approach can be applied to other properties and permission codes depending on the intended behavior.

The Challenge with Embedded Mimics

When creating reusable embedded mimics, object references are often passed through parameters.

For example, a mimic parameter may be defined as:

Parameter:Point.ObjectLink

An initial attempt might be:
IIF("Parameter:Point.ObjectLink"+".CheckAccess('CTL')",1,0)

However, this does not work as expected because the parameter is treated as a string rather than an object reference.

As a result, Geo SCADA does not evaluate the CheckAccess() method against the target object.

The Correct Solution: Indirect Expressions

To evaluate CheckAccess() against a parameterized object, an indirect expression must be used.

The following syntax allows Geo SCADA to evaluate the constructed object reference at runtime:

Example:

["Parameter:Point.FullName" + '.CheckAccess("CTL")']
The square brackets instruct Geo SCADA to evaluate the assembled string as an expression.
Example text animation:
CheckAccess

The parameter will:

  • Be visible when the user has CTL access.
  • Be hidden when the user lacks CTL access.

Schneider Electric Belgium

  • Documentation produits
  • Téléchargement de logiciels
  • Sélecteur de produits
  • Substitution et remplacement de produits
  • Centre d'aide et de contact
  • Trouver nos sites
  • Obtenir un devis
  • Où acheter
  • Communauté Schneider Electric
  • Carrières
  • Qui sommes-nous ?
  • Signaler une mauvaise conduite
  • Accessibilité
  • Salle de presse
  • Partenaires
  • EcoStruxure
  • Nos emplois
  • Blog
  • Soyez informé des nouveautés en premier ?
  • Conditions générales d'affaires
  • Protection des données
  • Mention sur les cookies
  • Conditions d utilisation
  • Conditions générales de vente et d'achat
  • Change your cookie settings
  • Centre de Préférences