Engine.CurrentUserHasPrivilege
- Updated2025-07-21
- 1 minute(s) read
Engine.CurrentUserHasPrivilege
Syntax
Engine.CurrentUserHasPrivilege( privilegeName)
Return Value
Returns True if the current user has the privilege.
Purpose
Confirms whether the current user or any user group of which the user is a member has a specific privilege.
Remarks
Returns True when the privilege property is True , when the privilege property of any group that contains the privilege is True , or when privilege checking is disabled, the StationOptions.EnableUserPrivilegeChecking property is False . If privilege checking is disabled but the StationOptions.RequireUserLogin property is True , this function returns True only if a user is currently logged on.
Parameters
privilegeName As String
[In] Specifies the name of the privilege to check. You can specify the name of any privilege property. You can specify the full privilege path in the user privileges property view, such as Debug.RunSelectedTests , or you can specify the base privilege name, such as RunSelectedTests . If you specify only the base privilege name and more than one instance of the base privilege name exists, the method returns the value of the first base privilege it finds with that name. You can pass "*" as the string argument to determine whether a user is currently logged in.
See Also
StationOptions.EnableUserPrivilegeChecking