Skip to content

Conversation

@mahdighadiriii
Copy link
Contributor

@mahdighadiriii mahdighadiriii commented Nov 11, 2025

Problem

Users set permission_classes on @action methods, but when using .as_view(), these are ignored.
Fixes #9638

Example:

@action(detail=False, permission_classes=[IsAuthenticated])
def test_action(self, request): ...

@browniebroke browniebroke changed the title Improve viewset action docs - add .as_view() warning Add warning regarding .as_view() with VieSet actions in the documentation Dec 9, 2025
@browniebroke browniebroke changed the title Add warning regarding .as_view() with VieSet actions in the documentation Add warning regarding .as_view() with ViewSet action in the documentation Dec 9, 2025
@browniebroke browniebroke merged commit cfc067b into encode:main Dec 9, 2025
7 checks passed
@browniebroke
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve viewset action docs

3 participants