lukaszb/django-guardian — Issue #55: GuardedModelAdmin Enhancement
Author: danols
Created: 2011-12-09 17:42:05+00:00
State: open

Hi Lukasz,

I have modified all my 'GuradedModelAdmin' to include the following code:

```
### additional admin actions for this adminmodel
def auth_group(obj): #, request, queryset):
model_level_perms = Group.objects.filter(permissions__content_type=ContentType.objects.get_for_model(obj)).distinct()
instance_level_perms = get_groups_with_perms(obj)
if 'guardian' in settings.INSTALLED_APPS:
return (model_level_perms | instance_level_perms).distinct()
```
This lets one add 'auth_group' to the 'list_display' settings and have a way to see group access at a glance in the list. What do you think of adding something like the above into the 'GuradedModelAdmin' class?.