Handling permissions using Django’s admin interface — django-authority v0.2 documentation

### Navigation

- index
- next |
- previous |
- django-authority v0.2 documentation »

# Handling permissions using Django’s admin interface

to be written

Note

Django admin actions are available in Django 1.1 or later.

## Apply permissions using Django’s admin actions

This feature is limited to superusers and users with either the “Can change permission” (`change_permission`) or the “Can change foreign permission” (`change_foreign_permission`) permission.

### Disable the admin action site-wide

To disable the action site-wide, place this line somewhere in your code. One of your app `admin.py` files might be a good place:

    admin.site.disable_action('edit_permissions')

Further informations are available in Django’s documentation: Disabling a site-wide action.

### Disable the admin action per ModelAdmin instance

In case you want to disable the permission action per ModelAdmin, delete this action within the `get_actions` method. Here is an example:

    class EntryAdmin(admin.ModelAdmin):

        def get_actions(self, request):
            actions = super(EntryAdmin, self).get_actions(request)
            del actions['edit_permissions']
            return actions

Further informations are available in Django’s documentation: Conditionally enabling or disabling actions.

### Navigation

- index
- next |
- previous |
- django-authority v0.2 documentation »