[AccessD] SPAM-LOW: Re: Access 2007 accde User Security

jwcolby jwcolby at colbyconsulting.com
Tue Jan 26 22:04:48 CST 2010


 >  HOLY COW John... It's going to take me a month just to understand what in the world is going on 
in there...

Naw, it's easy.  There are three tables - Users, Groups and UsersInGroups.

There are three classes - User (usysclsPLSUser), Group (usysclsPLSGroup) and UsersInGroups 
(usysclsPLSGroupUser).  Each instance of these classes holds ONE RECORD for the corresponding table. 
     Each instance of usysclsPLSUser holds one record from usystblPLSUsers, etc.

There is a supervisor class (usysclsPLS).  This class is the center of the universe.  It loads all 
of the other stuff.  It forms a cache.  It completely loads the user table usystblPLSUsers into 
instances of usysclsPLSUser and stores the class instances in a collection.  Likewise for the Group 
and UserGroup tables.

There is a module for initializing the thing - usysBasPLS.  It initializes usysclsPLS which loads 
(caches in memory) the three tables.  mPLSInit.  Once that runs the entire system is loaded and 
ready to rock and roll.  Please tell me you are not into Opera - C2DbPLS does not do Opera.  ;)

mclsPLS.mInit is the initialization method of the supervisor class.  Go there to watch it start 
loading the cache.

Once mclsPLS is initialized, you can start asking questions such as "Does user X belong to Group A".

Function mPLSUserInGroup(lngPLSUserID As Long, ParamArray lngGroups() As Variant) As Boolean

Call mPLSUserInGroup, pass in a single user ID and as many group IDs as you want to check.

Look at the other methods in that module for other questions you can ask.

The rest of the classes are "to be continued...".  You only need to concentrate on the pieces 
described above.

 >Your use of classes as objects "out classes" my understanding. It's on a whole different level, 
like several different levels, than where I'm at....

Look at it this way, this is the perfect opportunity to see how classes can do things that are 
damned near impossible without them.  Pre-written code that you can step through.  Me to ask 
questions of.

 > Damn....

You too can be a Jedi Master.  ;)

I am not kidding, once you wrap your mind around classes the universe balloons around you.


John W. Colby
www.ColbyConsulting.com


Robert wrote:
> Got it.....
> 
>  HOLY COW John... It's going to take me a month just to understand what in
> the world is going on in there... Your use of classes as objects "out
> classes" my understanding. It's on a whole different level, like several
> different levels, then where I'm at....
> 
> Damn....
> 
> WBR
> Robert




More information about the AccessD mailing list