Hi, I originally posted this in the appenine-group, but figured that it maybe better belongs in this group....
I am working on a project where want to be able to grant different permissions for users on entities, say read/write. I guess this is a common scenario, and maybe this has been sorted out in another thread already but I could not find it. I am using JDO. This is the setup: - An entity (e.g. a document) can have many users with different permissions associated with it. - I want to be able to query for: - "what users/permissions does this entity have" - "what entities does this user have any permissions on" - or even "what entities does this user have write-permissions on" What would be the proper way of doing this? I have thought of the following ways, but have no feel for what is the "correct" way to do it to minimize indexes, query roundtrips etc: 1. The entity having two lists: List<String> permission_w and List<String> permission_r ? Here the strings represent user ids. Risk of exploding indexes? 2. The entity having two lists: List<MyUser> permission_w and List<MyUser> permission_r ? This would make the lists children of the entity (due to JDO) (i think?). 3. The entity having one list: List<UserPermissions> permissions; The UserPermission class would contain user_id and read/write flag. Regards, Chuck -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
