I've recently came across a problem for which I can only think of muddy solutions.
Imagine a table has several objects (lets say photos to make it easier). Every single photo/object must have it's own set of permissions.
1 - photo must always be seen by uploader
2 - photo belongs to a group of photos and all users that have access to that group can see it
3 - photo can be shut-out and made private
4 - photo can be "authorized" user-specific
5 - photo can be "denied" user-specific
Both the users and the groups of photos will grow to a moderate size.
I'm not looking for a SQL-detailed query here. Just hoping that someone could point me in the right direction.