django-guardian - per object permissions for Django
django-guardian is an implementation of object permissions for Django providing an extra authentication backend.
Features
- Object permissions for Django
- AnonymousUser support
- High level API
- Heavily tested
- Django's admin integration
- Decorators
django-guardian supports Python 3.9+ and Django 4.2+.
Source and issue tracker
The source code and issue tracker are available on GitHub. If you find a bug, have a suggestion, or would like to request a feature, you may file a ticket there.
Alternate projects
Django has the foundation for object-level permissions
[1]
,
django-guardian makes use of these facilities, and it is based on them.
While it is possible to role-your-own implementation,
we recommend using django-guardian, but we may be biased.
There are some other third-party projects, including:
- django-authority
- django-permissions (Archived)
- django-rules
References
[1] See https://docs.djangoproject.com/en/stable/topics/auth/customizing/#handling-object-permissions for more detail.