The problem
A question on a public coding board this month pointed at a quiet hole in a multi-tenant API. The author had a Django REST Framework (DRF) permission class that checked obj.workspace_id == request.user.workspace_id . Retrieve, update and delete all call get_object() , so those routes were protected. The list route does not call get_object() . If get_queryset still returned Project.objects.all() , the list handed back every workspace's rows.
The same gap shows up on a custom @action(detail=False) , or on a get_object you write yourself and forget to hook up. Filtering in get_queryset closes the hole, but then the rule lives in two places, and a new viewset can ship without the filter. The post asked how people keep that from happening.
This is not a rumor. The official DRF permissions page says it straight.…