phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Phpgroupware-developers] retrieval of granted records - idea


From: Dave Hall
Subject: Re: [Phpgroupware-developers] retrieval of granted records - idea
Date: Sat, 04 Mar 2006 11:01:44 +1100

> When displaying records based on grants - I think there is a potential
> for a more effective retrieval of records.
> 
> Currently  - if a group has granted rights to read its records - all
> the members of that group are put into an array - and imploded into a
> filter like : "WHERE ( $entity_table.user_id IN(" . implode(',',
> $public_user_list) . "))"
> 
> I think this is OK if the $public_user_list consists of only 'users'.
> If some of the granters are groups (with hundreds of members) -
> would'nt it be more efficient to treat the groups by joining the
> $entity_table with  phpgw_acl on $entity_table.user_id =
> phpgw_acl.acl_account WHERE phpgw_acl.acl_location IN (list of
> group_id's) ?
> 
> If this is a good idea - we would need a function acl2->get_grants_new
> that returned users and groups without identifying each member within
> groups.

Great idea!

Having the class generate the required SQL would be handy too.

I have some code kicking around somewhere which I used for a client
project where I had quite a few tables with joins and stuff.  Maybe we
can add it to class db.  I will try to dig it up over the weekend and
send it to you.  It uses arrays for generating SQL.  It is a lot more
lightweight than the SQL gen stuff in 16.  This would make it a lot
easier for people to use this type of stuff.

Cheers

Dave
-- 
Dave Hall (aka skwashd)
API Coordinator
phpGroupWare
+-------------------------------------+-------------------------------+
| e address@hidden          | w phpgroupware.org            |
| j address@hidden                 | aim skwashd                   |
| icq 278064022                       | msn address@hidden       |
| sip address@hidden       | y! skwashd                    |
+-------------------------------------+-------------------------------+





reply via email to

[Prev in Thread] Current Thread [Next in Thread]