|
-
Aug 27th, 2003, 03:44 AM
#1
Thread Starter
Junior Member
Authorizing users based on User Groups
Hi there
I want the authorize users to use a normal Windows32 application based on there User Group. Ex only people in the
"Technical Sales" department are allowed to use the program.
The User Group information must be gathered from the
Domain Controller.
I would appreciate some help in this matter.
Thanx in advance
-
Aug 27th, 2003, 10:40 AM
#2
Something like this should work:
VB Code:
'get current user's principal
Dim usr As New Security.Principal.WindowsPrincipal(Security.Principal.WindowsIdentity.GetCurrent)
If Not usr.IsInRole("Technical Sales") Then
'close program
Me.Close()
End If
The group may have to have the domain in it also (i.e. "MHC\Technical Sales") but I don't think so.
-
Aug 27th, 2003, 10:57 AM
#3
Frenzied Member
Originally posted by Edneeis
The group may have to have the domain in it also (i.e. "MHC\Technical Sales") but I don't think so.
Why MHC? y not MCHC ?
'Heading for the automatic overload'
Marillion, Brave, The Great Escape, 1994
'How will WE stand the FIRE TOMORROW?'
Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979
-
Aug 27th, 2003, 11:08 AM
#4
MHC is the domain at work (Managed HomeCare). Whats MCHC?
-
Aug 27th, 2003, 01:26 PM
#5
Frenzied Member
Originally posted by Edneeis
MHC is the domain at work (Managed HomeCare). Whats MCHC?
Guessed its a domain somewhere . MCHC is Mean Cell Hemoglobin Concentration
'Heading for the automatic overload'
Marillion, Brave, The Great Escape, 1994
'How will WE stand the FIRE TOMORROW?'
Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979
-
Aug 27th, 2003, 02:18 PM
#6
-
Aug 28th, 2003, 12:30 AM
#7
Thread Starter
Junior Member
Thanx it worked!
And you do need to include the domain name.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|