Permission Based Access
Permission Based Access
Permission Based Access
Permission Based Access
Permission Based Access
Permission Based Access Permission Based Access Permission Based Access Permission Based Access Permission Based Access Permission Based Access Permission Based Access Permission Based Access
Permission Based Access Permission Based Access
Permission Based Access
Go Back  Xtreme Visual Basic Talk > > > Permission Based Access


Reply
 
Thread Tools Display Modes
  #1  
Old 08-21-2012, 05:38 PM
Andrewhuk Andrewhuk is offline
Newcomer
 
Join Date: May 2008
Posts: 19
Default Permission Based Access


I am currently writing a asp.net application where I require different admin users to have different permissions to access parts of the site.

Can anyone point me in the direction where I can work on this further, either samples or write ups would be much appreciated.

Thanks,

Andy
Reply With Quote
  #2  
Old 08-24-2012, 09:03 AM
torpkevuk's Avatar
torpkevuk torpkevuk is offline
Contributor
 
Join Date: Oct 2003
Location: Nebraska, USA
Posts: 640
Default

I've done some stuff like this before - no writes ups as the company I worked for would rip me a new one if I shared that

There are a lot of ways to do it.. you can tie in AD security and use the groups.. though the way I've done it in the past (im a database guy, not all my stuff uses windows server) is to create a permissions table within the database - that has permissions like LOGIN, CREATE, MODIFY, DELETE etc. Then create a security group table, then group-user table - then a simple SQL lookup on each page load does the job

Something like:

PermID = 1 | PermName = LOGIN | PageName = 'usersetup.aspx'

Group would be like.. GroupID = 1 | GroupName = 'UserAdmin'

So we'd have a table with PermID and GroupID

And finally a UserID = 1, GroupID = 1

A quick bit of sql, pop it into a function validLogin(userid, pagename) = true/false

Then query that function on each page.

Its reinventing the wheel a bit, like I say, you could use Active Directory lookups if they're available - though this approach works well.

Here's a link on how to do it via AD:

http://stackoverflow.com/questions/2...-sharp-asp-net
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Permission Based Access
Permission Based Access
Permission Based Access Permission Based Access
Permission Based Access
Permission Based Access
Permission Based Access Permission Based Access Permission Based Access Permission Based Access Permission Based Access Permission Based Access Permission Based Access
Permission Based Access
Permission Based Access
 
Permission Based Access
Permission Based Access
 
-->