Hi Nina <snip>
> However, what I'd like is a simple command to find all pictures that a > given user has access to. I realize that I can find all pictures and > check them one by one. However, this seems expensive to me (one query > to get all pictures and then N queries to check the permissions). > There must be a simpler way to do it, but to find it requires a deep > understanding of how acl work, and I don't really have that > understanding (yet), so I am asking you. Has anyone here encountered a > similar problem, and how did you solve it? If not, do you have any > ideas on how I might attack this problem? If you have a look at the api for ACL you will find that ACL provides a number of methods that aren't obvious from the documentation. One of them (I don't remember which) takes an ARO id as an argument and returns a tree of ACO objects that the ARO has access to. I think that this should suite your needs. ... I have just tried to work back through the code and extract the key part, but for the life of me I can't find what I am looking for in the api, or the Cake ACL code. I did however discover the following thread that I posted on this subject a while ago: http://groups.google.com/group/cake-php/browse_thread/thread/263d3ffd6fb7533d/94779c7877163bb0 It explains what I did and shows the code that I used. However I can't find the parts of the api that it depends upon. Let me know if you need more explanation. Regards, Langdon --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---