djangorestframework-stubs icon indicating copy to clipboard operation
djangorestframework-stubs copied to clipboard

Permission operands don't work

Open skrat opened this issue 3 years ago • 2 comments

@permission_classes([IsAuthenticated|ReadOnly])

The above snippet doesn't work because the operator doesn't return permissions.BasePermission object. It returns permissions.OperandHolder. So the stub should be allowing for this type to be in the sequence.

skrat avatar Jan 18 '22 19:01 skrat

Bump on this since it seems to still be an issue in my testing with custom permission classes (i.e. class MyPermission(BasePermission): ...).

nefrob avatar Jul 23 '23 14:07 nefrob

PRs are welcome :)

sobolevn avatar Jul 23 '23 17:07 sobolevn