Can anyone suggest a scalable design pattern for implementing access control on Photos and Albums, each with individual privacy settings (i.e. owner, group member, public)?
I'm using CakePHP, and the examples I have read on the ACL component seem to control access to controller/actions, not objects themselves. It seems to get out of hand when I try to track
- /C/R/U/D privileges
- per controller-action
- per privacy setting (i.e. owner, group member, public)
- per Album, Photo, etc.
Especially when you might have 1000s of photos per Album, and Photos habtm Albums. Am I right or am I missing something completely?
Can someone add some pseudo code to help me understand how to tackle this problem? Or point me in the right direction Because I know it's been done before on sites like Flickr.
tia.