Print Page | Close Window

Restricted pages

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=4439
Printed Date: 30 March 2026 at 6:37am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Restricted pages
Posted By: breeze76
Subject: Restricted pages
Date Posted: 22 July 2003 at 8:30am
Is there a way, code wise to use cookies or whatever to restrict certain pages and to let view certain pages for certain groups of people?



Replies:
Posted By: ljamal
Date Posted: 22 July 2003 at 9:32am
yes

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: ljamal
Date Posted: 22 July 2003 at 9:46am
The way I go about this is assigning permission levels from 0 to whatever. The lower the level the more access. 0 level would be the highest access and have all the permissions of the other level. A level 1 would have less access than 0 but more than 2.

If using Access, I general store this level in a cookie and set the level at login. This prevents multiple hits to the database just to check levels. If using SQL server, I build a stored procedure to check levels and return it with every page query.

Take LongBox.com, there are 20 different permission levels overall with 5 different permission structures. This is all controlled and configured by the database and every update to the website check you permission level.

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: zaboss
Date Posted: 22 July 2003 at 11:34pm

I use a system similar to what jamal said but at login i set a session variable (as it is only one character it does not hit the server very hard, and this way you don't have to access the db on overy page). And on each page I put something like

<% If Session("UserLevel") < X then ' the user is not OK
Response.Redirect ("mypage.asp")
Else ' the user is OK
End if %>



-------------
Cristian Banu
http://www.soft4web.ro - Soft 4 web



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net