Re: [phplib] same level perms From: Spruce Weber (sprucely <email protected>)
Date: 01/23/01

Matt,
I haven't touched on this in awhile, but I made a simple extension of
phplib's perm class for group permissions. It allows for an unlimited number
of groups, and a user can be assigned a different set of permissions for
each group they are added to. I don't have the code in front of me, but if
you're interested I can scrounge it up. It's similar to and coexists with
phplib's default permission scheme.

check_group()
in_group()
check_group_perms()
have_group_perms()

Then you could provide restricted access as follows...

if($perm->have_group_perms('iteditor','admin')||$perm->have_perm('admin')) {
  echo "Either you have global admin permission or you have admin permission
for group iteditor.<br>";
}

Let me know if you're interested.
Spruce

----Original Message Follows----
From: "Matt Williams" <matt <email protected>>
To: "PHPLib" <phplib <email protected>>
Subject: [phplib] same level perms
Date: Tue, 23 Jan 2001 15:35:46 -0000

Hi

I would like to have a permissions array where I could have 16 groups which
are only allowed to view pages of their own group and any below, but users
with higher permissions must be able to view all these pages (as well as
lower ones). Sort of like an inclusive permissions array but with some sort
of same level acces built in

So for example if I had a permissions array like below

   var $permissions = array(
                             "user" => 1,
                             "author" => 3,
                             "editor" => 7,
                                    "iteditor" => 7,
                                      "arteditor" => 7,
                             "supervisor" => 15,
                             "admin" => 31
                           );

obviously this doesn't work but maybe you see what I am trying to achieve.
  I want other users at the editor level to be able to enter pages below but
could not enter pages on the same level apart from there own, but admin
users still need to be able to see all users below them.

TIA

M@

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>