From 05aec0a4aa111b54b50daec64059fd18ac70b437 Mon Sep 17 00:00:00 2001 From: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> Date: Tue, 1 Sep 2026 17:44:30 +0200 Subject: Clarified scope of object-level admin view permissions. --- docs/ref/contrib/admin/index.txt | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'docs') diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index 0243c2b980..eb8b2a3c0f 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -1959,15 +1959,24 @@ default templates used by the :class:`ModelAdmin` views: .. method:: ModelAdmin.has_view_permission(request, obj=None) - Should return ``True`` if viewing ``obj`` is permitted, ``False`` - otherwise. If obj is ``None``, should return ``True`` or ``False`` to - indicate whether viewing of objects of this type is permitted in general - (e.g., ``False`` will be interpreted as meaning that the current user is - not permitted to view any object of this type). + Should return ``True`` if the user is permitted to access the change or + history view for ``obj``, and ``False`` otherwise. If obj is ``None``, + should return ``True`` or ``False`` to indicate whether viewing of objects + of this type is permitted in general (e.g., ``False`` will be interpreted + as meaning that the current user is not permitted to view any object of + this type). The default implementation returns ``True`` if the user has either the "change" or "view" permission. + .. admonition:: Object-level view permissions aren't visibility filters + + Object-level view permissions don't prevent information about an object + from appearing elsewhere in the admin, including in the admin + changelist, related field choices, autocomplete results, and recent + actions. To restrict this information, customize the querysets used by + the relevant views and form fields. + .. method:: ModelAdmin.has_add_permission(request) Should return ``True`` if adding an object is permitted, ``False`` -- cgit v1.3