Skip to content

About

Django permission system for object-level authorization.

Resources

Stars

16 stars

Watchers

3 watching

Forks

Repository files navigation

django-trusts

django-trusts badger mascot holding a green key

Coverage

django-trusts is a Django permission system for object-level authorization. It integrates with Django's authentication backend interface, allowing applications to use familiar checks such as user.has_perm(permission, object) while defining authorization policies with ordinary Django models.

How permissions are represented

A trust model is the application-owned Django model from which three authorization paths begin:

  • user — who is requesting access;
  • permission — the operation being requested; and
  • content — the object being protected.

Each matching trust record is a candidate grant. A trust model is often an explicit many-to-many relation model, but it may represent another relational shape. More than one complete trust may reach the same protected model; each is an alternative grant and the branches combine with OR.

django-trusts supplies the compiler and authorization APIs. It does not impose a permission schema, grant editor, or application workflow.

Usage

Start with Installation in the usage guide. The RST guide covers models, backend configuration, trust registration (both one-argument path lambdas and Django __ strings, shown together), named filters, object and queryset authorization, and inherited relationships.

Other documents

Other repositories

Copyright BeeDesk, Inc., 2015–2026. Released under the BSD 2-Clause License.

About

Django permission system for object-level authorization.

Resources

Stars

16 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages