You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have added an HTTP method to a view set, with the SimpleRouter and the list_route decorator.
I am having an issue with the permission classes for this method alone. I set a permission (different from the ViewSet) in the decorator as in the current docs:
Well, it beats me. My user case is pretty simple actually. I added some logging, and neither the ViewSet permission class nor the decorator one are being called.
Please let me know if there if there is any information I could provide to sort this out, or any suggestion. Thanks again!
Just set this up from scratch and ran through it all locally: using the @list_route decorator on a ViewSet and specifying a permission_classes that is different than the one of the class. Everything checked out and seems to be working as expected, the permission class specified in the decorator is the one being called when hitting the endpoint for that view.
So with that being said, I'm going to say that the problem is elsewhere.
Hi there!
I have added an HTTP method to a view set, with the SimpleRouter and the list_route decorator.
I am having an issue with the permission classes for this method alone. I set a permission (different from the ViewSet) in the decorator as in the current docs:
But this different permission class is ignored. Maybe this is on purpose?
Or should it be working as it is, and the problem is elsewhere?
Thanks!
The text was updated successfully, but these errors were encountered: