Benoit Lathiere <[EMAIL PROTECTED]> wrote:
> Hi !
>
> I've got several groups in cascade with different users at different levels....
> In my pages, I use mgd_is_member(x) to control access...
>
> my question : how inheritance works between parents groups and children... ?
>
> by example :
>
> group 1 (with user A)
> |
> |----> group 2 (with user B)
>
> <? If (mgd_is_member(id_of_group_1)).... ?>
>
>
> is user B indirectly member of 1, or A is in 2, by inheritance...????
I just made a small "SecurePage" class to manage pages access.
There is a little bug in it , but if You need I will fix that , and send.
In practice it works like:
code-init element:
<?
mgd_include_snippet("/path/to/snippet/");
$test = new SecurePage();
// initialize empty object
//$test->SecureConfig( $person->id, $_POST);
// 1. checks if person is assigned to groups which may access that page
// (custom behaviour)
// 2. if argv[0] == config and page is active displays login boxif no user is logged
in
// similiar to NemeinAuth
// if person is logged in it displays multiple form to select , which groups should be
// assigned to current page
// OR
//$test->Secure($person->id);
// checks if any person is logged and if is member of groups assigned to page
// You may assign as many groups to the page as You wish
?>
Piotras
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]