User.HasPrivilege
- Updated2025-07-21
- 1 minute(s) read
User.HasPrivilege
Syntax
User.HasPrivilege( privilegeName)
Return Value
Purpose
Returns True if the user or any user group of which the user is a member has the privilege you specify by name.
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 UserPrivileges 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.