[phplib-dev] permissions From: Marius ANDREIANA (rocky <email protected>)
Date: 06/24/00

Hi

This is from a discussion on phplib list.

I want to change the Perm class to :
* store the permissions as array text => numeric (current : yes)
* store the permissions in variable $perms as numeric
(current : stored in Auth)
  I want this because it would be nice for the Perm class to be
independent. Example of use : a member, with editor permission,
want to give to another member the permission author.
$p = new Perm;
$p->set_from_text($text_perms);
$p->set_perm("author");
$text_perms = $p->get_text();

* get/set a permission, with functions like
set_perm("author"); //current : no ?
has_perm("author"); //current : yes

* When authentificating the user (e.g. in Example_Auth, validate_login())
use the global variable $perm to store the permissions in the $perm class
(if it's the case).

Please let me know what do you think, what else should be done.
I use permissions a lot and if this code will be merged in
PHPLIB it will be very helpful.

Marius

--
Your mouse has moved. In order for the change to take effect, 
Windows must be restarted. Reboot now ? [OK]
http://lug.ro/ldir

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