Clarify operators precendence in permissions documentation (#9875)

This commit is contained in:
Lorenzo Guideri 2026-01-24 15:33:10 +01:00 committed by GitHub
parent c8af56d260
commit 249fb47842
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -138,7 +138,10 @@ Provided they inherit from `rest_framework.permissions.BasePermission`, permissi
return Response(content) return Response(content)
!!! note !!! note
Composition of permissions supports `&` (and), `|` (or) and `~` (not) operators. Composition of permissions supports the `&` (and), `|` (or) and `~` (not) operators, and also allows the use of brackets `(` `)` to group expressions.
Operators follow the same precedence and associativity rules as standard logical operators (`~` highest, then `&`, then `|`).
# API Reference # API Reference