I've been reading and playing with r.what and I haven't found an example
that explains my needs.
My classes are User, Group, Permission, Album.
I want to give each Album its own group permissions, not just global
permissions like 'edit-album' (like in
in fact, 'edit-album' only makes sense in the presence of an album_id, so I
guess I have to implement something like:
User(id, username, ...)
Permission (id, name)
ALBUMPERMISSION(ID, ALBUM_ID, GROUP_ID, PERMISSION_ID)
Please correct me if I'm wrong, r.what only checks wheter or not a Group
is associated to a Permission.
How do I connect these two variables in a single permission (permission_id
and album_id)? I know I'll also have to build my predicates, since most of
the built ins check for global permissions. I'm thinking of something like
def delete(self, album_id)...
Any help would be greatly appreciated.
Repoze-dev mailing list