Skip to content

v0.1.4 — Fix nested permission composition with & | ~ operators

Latest

Choose a tag to compare

@hoaxnerd hoaxnerd released this 10 Mar 20:04
· 1 commit to main since this release

Composed permissions like IsAuthenticated() & (IsOwner() | IsAdminUser()) raised TypeError because _AND/_OR/_NOT used isinstance(x, BasePermission) to decide whether to call x() — but composed objects aren't BasePermission subclasses. Added _resolve_perm() helper that recognizes all permission types (_AND, _OR, _NOT, BasePermission) and passes them through as-is.