Skip to content
Snippets Groups Projects
  • Konrad Mohrfeldt's avatar
    5bc1f22b
    fix: remove superfluous retrieve/update actions for APIUserViewSet · 5bc1f22b
    Konrad Mohrfeldt authored
    The retrieve and update actions can be removed because the get_queryset
    method already ensures that the user has only access to their own user
    object (or all user objects in case of superusers).
    
    Sending 401 responses for unauthorized requests may also be considered
    leaky, because it exposes that these objects exist instead of returning
    a 404 that simply states that no object with that primary key can be
    found.
    5bc1f22b
    History
    fix: remove superfluous retrieve/update actions for APIUserViewSet
    Konrad Mohrfeldt authored
    The retrieve and update actions can be removed because the get_queryset
    method already ensures that the user has only access to their own user
    object (or all user objects in case of superusers).
    
    Sending 401 responses for unauthorized requests may also be considered
    leaky, because it exposes that these objects exist instead of returning
    a 404 that simply states that no object with that primary key can be
    found.