Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ASP.NET Security, Roles?
Message
 
To
10/02/2004 11:18:23
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00875536
Message ID:
00876112
Views:
11
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform