On Sep 10, 9:24 am, Fran Iglesias <[EMAIL PROTECTED]> wrote:
<snip>
> For example. I need to allow several groups to acces to an index
> action, but I need to retrieve only the items that are are allowed to
> the logged user.

ACL logic does not lend itself easily to mass searching like that, and
I've seen it referred to as the holy grail of acl - very useful but
near impossible to find. It's been discussed here before (most
appropriate thread:
http://groups.google.com/group/cake-php/browse_frm/thread/263d3ffd6fb7533d/2e5bd958d4be3ddd?lnk=gst&q=acl+ad7six+sani+owner+edit&rnum=1#2e5bd958d4be3ddd).

If you are creating an aco per object you may well find that the only
way to get an index is to build your index one row at a time; the
single sql to do it is quite complex something like:

Select
     what you want
From
    your table
Where
 (Subquery for first allow rule for node or parent(s) going up the
tree )&&(!not subquery for specify deny rule lower in the tree)

I never got this to work very well, and even if it did it would be
pretty slow. If someone else managed it: please, share ;).

hth,

AD



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to