Results 1 to 7 of 7

Thread: Authorizing users based on User Groups

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2001
    Location
    South Africa
    Posts
    28

    Question 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

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Something like this should work:
    VB Code:
    1. 'get current user's principal
    2.         Dim usr As New Security.Principal.WindowsPrincipal(Security.Principal.WindowsIdentity.GetCurrent)
    3.         If Not usr.IsInRole("Technical Sales") Then
    4.             'close program
    5.             Me.Close()
    6.         End If

    The group may have to have the domain in it also (i.e. "MHC\Technical Sales") but I don't think so.

  3. #3
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    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

  4. #4
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    MHC is the domain at work (Managed HomeCare). Whats MCHC?

  5. #5
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    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

  6. #6

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Jan 2001
    Location
    South Africa
    Posts
    28
    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
  •  



Click Here to Expand Forum to Full Width