'How can I combine permissions in `strawberry` with logical OR rather than AND?
i'm using strawberry to great success. however, there is one scenario that i would like to achieve:
@strawberry.mutation( permission_classes=[ IsAuthenticated, IsAuthorized ] )
works great; however, i also want to add a IsAdmin
permission class. Unfortunately, i can't just add it to the list of permission_classes
as the permissions work as an AND rather than an OR (since normal users are not admins, the permission checks will fail).
is there someway i that OR can be implemented in the processing of permission_classes
?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|