[Python] Specific permissions for different types of users with django rest framework model...

Discussão em 'Python' iniciado por Stack, Maio 15, 2025.

  1. Stack

    Stack Membro Participativo

    I'm using DRF's ModelViewSet for my views and DefaultRouter to create the urls.

    This particular model creates a feature that only admins have full CRUD access.

    Authenticated users should have READONLY and Delete permissions. And Anonymous users should only have READONLY access.

    I'm pretty sure that I understand that is_staff set to True takes care of any admin permissions for CRUD access in django admin. I'm just not sure how to set up the Anonymous and Authenticated user permissions in the Model and View.

    How can I setup these particular permissions for the different types of users? Does this setup require specific Model and View permissions?

    Continue reading...

Compartilhe esta Página