我们今天能为您提供什么帮助?

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.

施耐德電機Taiwan

  • 產品文檔
  • 軟體下載
  • 產品選型工具
  • 產品替代和替換
  • 幫助和聯絡中心
  • 尋找我們的辦公室
  • 取得報價
  • 施耐德電機社群
  • 人才招募
  • 公司簡介
  • 舉報不當行為
  • 無障礙
  • 新聞中心
  • 投資者
  • 專業洞察
  • 台灣施耐德電機學院
  • 綠色影響力落差調查
  • Schneider Go Green 2025
  • 隱私政策
  • Cookie通告
  • 使用條款
  • Change your cookie settings