-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
In my viewset I have the following:
permission_classes = [ Or(And(IsReadOnlyRequest, IsAuthenticated), And(IsPutRequest, IsObjectUser)) ]
Where IsObjectUser has:
def has_object_permission(self, request, view, obj): return obj.user == request.user
The has_object_permission method is never invoked when wrapped inside the conditional statement. However, If I use the IsObjectUser as a plain permission class in permission_classes list, it works fine. This isn't suitable for me because I need them for each method, not for the whole viewset, always.
If this is bug, I would love to see it fixed. Any suggestions or workarounds are appreciated.
davidcorbin and titovanton
Metadata
Metadata
Assignees
Labels
No labels