> 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 [EMAIL PROTECTED]          | w phpgroupware.org            |
| j [EMAIL PROTECTED]                 | aim skwashd                   |
| icq 278064022                       | msn [EMAIL PROTECTED]       |
| sip [EMAIL PROTECTED]       | y! skwashd                    |
+-------------------------------------+-------------------------------+



_______________________________________________
Phpgroupware-developers mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/phpgroupware-developers

Reply via email to