
 Rank: Guest Groups: Guest
Joined: 9/17/2007 Posts: 11,670 Points: -1,200
|
Date parsed: 02/04/2008 13:08:32 Date: Wed, 2 Apr 2008 17:08:32 -0400
I hope this is the right place for this question - I haven't found any other group whose name even vaguely would seem likely as a place to ask this question.
I'm working on a (VS2008) VB program. It is likely that any number of people might be able to access the program but I wish to control what (specifically) they can do by using their membership in either a local or domain group.
VS2008 makes available the "IsInRole" construct which when called returns a T/F if the current authenticated machine user is a member of one of a set of local, domain, or global groups.
It is used as follows:
If My.User.IsInRole( _ ApplicationServices.BuiltInRole.Administrator ) Then ' Whatever code is to be executed... End If
This works perfectly as long as the "role" is one of the VS2008 (and NT) standard groups - Administrator, BackUpOperator, etc. Unfortunately, these doesn't seem to be any method/way to specify a group which might be created for this purpose, like "SiteCoordinator" or "SeniorMonitor."
Is anyone familiar with either how this construct can be used to determine membership in a created group or of some other method (preferably in VB) which can be called via a VB program and determine whether an individual is a member of a group - local, domain or global - or not?
Thanks.
David Schrader
|