Tuesday, June 26, 2012

Object Permissions List Population

So I've created a Server model and whenever a server instance is created, a group associated with that server is also created.  So for server "Bender", the group "Bender Admins" is created.  Now, when a Request model instance is created with Bender as its foreignkey, I automatically assign Bender Admins the "modify" permission for that instance, using the object_permissions package (https://code.osuosl.org/projects/object-permissions), but now I need to populate the list of requests in the admin change list interface.  I want to display only those requests that the user is authorized to modify.  Any ideas on how to do this?  I know it needs to be in the template change_list.html or change_list_results.html.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/0nUxW0BOh0IJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment