Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ASP.NET Security, Roles?
Message
 
À
10/02/2004 11:18:23
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00875536
Message ID:
00876112
Vues:
9
>I too needed to have a role based form security model and basically wrote a sproc to determine if the logged in user was in fact assigned to an "admin" role. If yes, proceed to the requested page. If not, alert and return to the login page. I executed this sproc from a business class that gets called in the overridden on_load event of the page. I didn't find any other built in framework support to accomplish this type of form based role security, so I hope this helps! If anyone has a better mousetrap I'd like to know about it too!

What you've done is a good way to approach this. Right now, the mmRole business object has a "GetUserRoles()" method that returns all roles for the specified user, and you could scan through these to see if they belong to the role you're looking for. I've added an item to my "to do" list to add a new method to this object called "IsUserInRole()" that would allow you to perform this check more easily.

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