Hello I would like some advice on how to tackle the following problem:
I have a cakephp acl model where I have users and pictures. Users have access to some pictures and not to others. My aro alias is on the form User::$user_id and the aco alias for the picture is on the form Picture::$picture_id. I can always check if a user has access to a given picture by constructing the proper alias and using Acl->check. 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? :-) Nina --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---