Permissions and scoping¶
The batch route follows the same authorization rules as DRF's detail routes:
- Update and delete targets come from
get_queryset(). A pk outside the view's queryset is a404, exactly like a pk that does not exist, so ownership and tenant filters inget_queryset()apply to batches too. - Every target passes
check_object_permissions(). A target that fails a permission'shas_object_permission()makes the batch a403, with the permission's message on that row:
- Rows are validated only after both checks pass, so a caller never learns validation details about rows it cannot modify.
- Batch-field lookups are scoped with
BatchRelatedField(queryset=...)(see Scoping lookups).