LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to determine the group of a logged in user

Solved!
Go to solution

Hello,

 

I have a tab control that has 6-7 tabs. I want to show some tabs to normal users and I want to hide some tabs from those users, only Administrators can see them.  Is there any way to set the user accesses to tab pages indivudually? In settings of tab control there is only security settings which applies to tab control, not pages indivudually. I can show/hide pages programmatically, but I need to know the groups name (Administrator, Operators, Guest, Everyone) to which the logged in user belongs to.

 

According to that page it is also not possible 😞

 

Summary : How can I show/hide tab pages according to users group?

 

I am using Labview 2014 SP1 32-bit on Win8.1 with DSC module

0 Kudos
Message 1 of 6
(3,268 Views)

Hi kahlenberg,

I guess the fastest way is to use the CMD with gpresult.

For example this command - gpresult /r /scope:user - will give the whole summary of group privileges of the current user.

 

Then it is on you to properly parse the response 🙂

 

0 Kudos
Message 2 of 6
(3,248 Views)

Thanks for answer , but I've forgotten to mention that I don't mean the windows users and domains instead I mean users in Domain Account Manager from NI.

0 Kudos
Message 3 of 6
(3,238 Views)
Solution
Accepted by topic author kahlenberg

Ah, ok 🙂

 

 

Anyway I managed to get that info using VIs from the DSC Security palette:

 

get group info.png

0 Kudos
Message 4 of 6
(3,222 Views)

Oh, yes, thank you.

0 Kudos
Message 5 of 6
(3,213 Views)

Here is a discussion on how to do something similar to this, along with some VIs that do what you want without requiring DSC.

 

https://lavag.org/topic/15260-labview-and-windows-authentication/?do=findComment&comment=92010

0 Kudos
Message 6 of 6
(3,182 Views)