Welcome Guest Search | Active Topics | Members | Log In | Register

Question on "My.User.IsInRole" Options · View
David Schrader
Posted: Wednesday, April 02, 2008 1:08:32 PM


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


Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

YAFPro Theme Created by Jaben Cargman (Tiny Gecko)
Powered by Yet Another Forum.net version 1.9.1.1 (NET v2.0) - 9/10/2007
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.
This page was generated in 0.036 seconds.