Re: [Fwd: LU Getting Group Info]

Michiel Nugter <michiel-7H78rwzWSIOg3/[email protected]> Tue, 24 Jan 2006 15:25:29 +0100
Newsgroups gmane.comp.php.pear.liveuser
Message-ID <[email protected]>
Hi,

Doesn't this solution still raise issues with implied rights? There is 
no record in either table for an implied right....

-- 
regards,
 

Michiel Nugter
Dinnersite.nl
 

Lukas Kahwe Smith wrote:

> Hi,
>
> we have a problem in the way getRights() handles groups.
> its currently impossible to really filter by grouprights
>
> see below .. also see bug http://pear.php.net/bugs/bug.php?id=6417
>
> the problem is that it usually only makes sense to either join by
> userrights or by grouprights ..
>
> so I am proposing the following change. I am not yet sure if this should
> be an additional parameter or should be folded into $params.
>
> there is a new parameter for getRights() that determines if joins should
> be done using the 'userrights' (default) or through the 'grouprights'
> and 'groupusers' tables
>
> // use 'userrights' table
> $LUAdmin->getRights($params);
> $LUAdmin->getRights($params, true);
>
> // use 'grouprights' and 'groupusers' tables
> $LUAdmin->getRights($params, false);
>
> regards,
> Lukas
>
> -------- Original Message --------
> Subject: LU Getting Group Info
> Date: Mon, 23 Jan 2006 16:46:12 -0500
> From: Christian Roy <[email protected]>
> To: [email protected]
>
> Here are my API calls:
>
>
>
> GET rights for a user:
>
> $params = array(
>     'fields' => array('right_id','right_level','right_define_name',
>                       'area_define_name', 'application_define_name'),
>     'filters' => array(
>         'perm_user_id' => $perm_user_id,
>         )
>     );
> $rights = $admin->perm->getRights($params);
>
>
>
> Get rights for a group:
>
> $params = array(
>         //'fields' => array('right_id', 'right_level',
> 'right_define_name', 'area_define_name', 'application_define_name'),
>         'fields' => array(
>                 'right_id',
>                 'right_define_name',
>                 ),
>         'with' => array(
>                 'group_id' => array(
>                         'fields' => array(
>                                           'group_id',
>                                 ),
>                         ),
>                 ),
>         'filters' => array(
>                 'group_id' => $this->group_id,
>                 ),
>         //'limit' => 10,
>         //'offset' => 0,
>                 );
> $group_rights = $admin->perm->getRights($params);
>
>
> I cannot get the second one to return me information from the area and
> application table.
>
> Thanks.
>
>
>
>
>
> _______________________________________________
> LiveUser mailing list
> [email protected]
> http://mailman.21st-hq.de/mailman/listinfo/liveuser
>
>


Scanned by WinProxy
http://www.Ositis.com/