Skip to content Skip to sidebar Skip to footer

Django Rest_framework IsAdminUser Not Behaving

I have a viewset in rest framework that is not behaving like I would expect. If I login with a non-staff user and navigate to the api-url/users I can see all the users listed there

Solution 1:

Typo!

It's permission_classes, not permissions_classes.


About this part:

The IsAuthenticated permission is working, because if I logout I cget an error saysing that I am not authenticated.

I'm not sure why this is happening but I'd blame DEFAULT_PERMISSION_CLASSES in your Django settings - maybe you have IsAuthenticated specified there?


Post a Comment for "Django Rest_framework IsAdminUser Not Behaving"