Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Does a user belong to this group?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00539959
Message ID:
00540519
Vues:
20
Professor Wieder!

Haven't talked to you in a while...I hope you and the lovely Vanessa are doing well!

>If anyone has better ideas, let's hear them!>

Here's an *alternate* solution.

1. Create a subclass of CUserMgr
2. Add "v_UserGroups" to your app-specific copy of UserLoginEnvironment
3. Add a new "IsUserInGroup()" method to your new User Mgr class that accepts a user primary key and a group primary key. Add code to requery the view, and check the resulting cursor for the specified group...return a logical value indicating if the specified user is in the group.
4. Change classes.dbf so the Abstract Factory loads up your User Mgr rather than CUserMgr.

Hooking into the User Manager is a nice way to go since it's always available.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform