Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Each page Permission(new idea)
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Each page Permission(new idea)

 Post Reply Post Reply
Author
meteor View Drop Down
Groupie
Groupie
Avatar

Joined: 31 August 2003
Location: Iran
Status: Offline
Points: 67
Post Options Post Options   Thanks (0) Thanks(0)   Quote meteor Quote  Post ReplyReply Direct Link To This Post Topic: Each page Permission(new idea)
    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
--------------------
PowerFull Scripts For NTTacPlus
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.