From 249fb478427ac9d4ffcfa3f1b0e7502df23f9724 Mon Sep 17 00:00:00 2001 From: Lorenzo Guideri <78531018+LorenzoGuideri@users.noreply.github.com> Date: Sat, 24 Jan 2026 15:33:10 +0100 Subject: [PATCH] Clarify operators precendence in permissions documentation (#9875) --- docs/api-guide/permissions.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/api-guide/permissions.md b/docs/api-guide/permissions.md index b8179490e..8acbdf77d 100644 --- a/docs/api-guide/permissions.md +++ b/docs/api-guide/permissions.md @@ -138,7 +138,10 @@ Provided they inherit from `rest_framework.permissions.BasePermission`, permissi return Response(content) !!! 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