Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to apply access policies to class based views #103

Open
noemiefedon opened this issue Mar 28, 2024 · 2 comments
Open

How to apply access policies to class based views #103

noemiefedon opened this issue Mar 28, 2024 · 2 comments

Comments

@noemiefedon
Copy link

noemiefedon commented Mar 28, 2024

I would like to apply the class-based views, not to ViewSets or function-based views.
For example I would like to use the access policies to Views derived from rest_framework.generics, such as RetrieveAPIView.

I managed to apply the access policy when using "action": ["*"] for the RetrieveAPIView view, but if I use "action": ["list", "retrieve", "get"] it does not work, so I don't know how to use finely-tuned access policies in this context.

Thanks in advance for your help :)

@ex8
Copy link

ex8 commented May 24, 2024

I am also wondering this, does this library work for DRF Generic Views?

Edit: #37

@muler2009
Copy link

muler2009 commented Oct 5, 2024

I am also wondering why it doesn't work CBV?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants