NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How can it be got the list of groups the current user belongs to?

Solved!
Go to solution

No problem, glad I could help.

 

Charlie Rodway | Principal Software Engineer | Certified TestStand Architect (CTA)

Computer Controlled Solutions Ltd | NI Silver Alliance Partner | GDevCon#1 Sponsor

0 Kudos
Message 11 of 12
(698 Views)

To follow up Steven's post, you can use HasPrivilege() in the User class (or CurrentUserHasPrivilege() in the Engine class). There are many privileges that could be checked but the "standard" groups can be distinguished by looking at just a few:

 

If (user.HasPrivilege("Configure.GrantAll")==True) it's an administrator - no other standard group has this privilege.

If (user.HasPrivilege("Develop.GrantAll")==True) it's a developer - technicians and operators don't have this privilege.

If (user.HasPrivilege("Operate.GrantAll")== True) it's a technician, operators don't have this privilege (strangely Smiley Tongue).

0 Kudos
Message 12 of 12
(280 Views)