Print Page | Close Window

Each page Permission(new idea)

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=11122
Printed Date: 31 March 2026 at 4:48am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Each page Permission(new idea)
Posted By: meteor
Subject: Each page Permission(new idea)
Date Posted: 07 July 2004 at 2:07pm


Hi Forum
This is My new Idea For Page Permission (at least For my self)
in this isue i use Each page Permission versus User Prmission
by this idea U set certain Page access for user as follow
when U create user u set some flags of pages and in each page
the number of page permission will OR with User permission
and if its return 1 then user have access to page see Follow
Think we have at least 8 page (One Byte each page one bit)
0-0-0-0-0-0-0-0
From left to Right -> Page1,page2...Page8
then Page1 permission is 1-0-0-0-0-0-0-0
and page2 permission is  0-1-0-0-0-0-0-0
Page3 Permission is        0-0-1-0-0-0-0-0
.
.
.
page8 permission is         0-0-0-0-0-0-0-1

Ok We want User access to Page2,page5,page6,page8 then
we set flags as Follow
0-1-0-0-1-1-0-1 -> this is User permission(in bit mode)
Now at Top Of Page we Check Permissions as follow
when we make logical OR on this values(make OR on Page permission and User Permission)
it Returns Zero Or one(in logical) and Page will displayed or not
it is very useful when U want to restrict user to certain pages.


Sample:
page permission 00000010
user permission 01101011
(00000010)OR(01101011) = (00000010) -> true (Make bit by bit OR)
=> user have Permission to page

Or Other Sample:
Page permission 00010000
user permission 01101011
(00010000) OR (01101011) = (00000000) -> false user havnt permission to page

and if we have More page we can use Hex mode.
But My Problem is :
How can i make Logical or bit by bit (else its usual compare between True or false)
the Or Operator will return true in this two sample because this
two permision is not zero or null

 



-------------
Sincerely
--------------------
http://www.TacPlusPlus.com - PowerFull Scripts For NTTacPlus



Replies:
Posted By: dpyers
Date Posted: 07 July 2004 at 4:54pm

your need to use asp/vb xor operator for performing bitwise comparisons. You'd probably set up the permissions for each page as a mask for the xor.



-------------

Lead me not into temptation... I know the short cut, follow me.



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