From c12bc980e5b2bb25e447cd8dee550cad767f1ad2 Mon Sep 17 00:00:00 2001 From: sai-ganesh-03 Date: Thu, 7 Nov 2024 16:01:14 +0530 Subject: Fixed #17905 -- Restricted access to model pages in admindocs. Only users with view or change model permissions can access. Thank you to Sarah Boyce for the review. --- docs/ref/contrib/admin/admindocs.txt | 16 ++++++++++++---- docs/releases/5.2.txt | 4 +++- 2 files changed, 15 insertions(+), 5 deletions(-) (limited to 'docs') diff --git a/docs/ref/contrib/admin/admindocs.txt b/docs/ref/contrib/admin/admindocs.txt index 240def8efb..5a605748ad 100644 --- a/docs/ref/contrib/admin/admindocs.txt +++ b/docs/ref/contrib/admin/admindocs.txt @@ -56,13 +56,16 @@ Each of these support custom link text with the format Support for custom link text was added. +.. _admindocs-model-reference: + Model reference =============== -The **models** section of the ``admindocs`` page describes each model in the -system along with all the fields, properties, and methods available on it. -Relationships to other models appear as hyperlinks. Descriptions are pulled -from ``help_text`` attributes on fields or from docstrings on model methods. +The **models** section of the ``admindocs`` page describes each model that the +user has access to along with all the fields, properties, and methods available +on it. Relationships to other models appear as hyperlinks. Descriptions are +pulled from ``help_text`` attributes on fields or from docstrings on model +methods. A model with useful documentation might look like this:: @@ -86,6 +89,11 @@ A model with useful documentation might look like this:: """Makes the blog entry live on the site.""" ... +.. versionchanged:: 5.2 + + Access was restricted to only allow users with model view or change + permissions. + View reference ============== diff --git a/docs/releases/5.2.txt b/docs/releases/5.2.txt index d07e9cb098..88a1daa45d 100644 --- a/docs/releases/5.2.txt +++ b/docs/releases/5.2.txt @@ -47,7 +47,9 @@ Minor features * Links to components in docstrings now supports custom link text, using the format ``:role:`link text ```. See :ref:`documentation helpers ` for more details. - + +* The :ref:`model pages ` are now restricted to only + allow access to users with the corresponding model view or change permissions. :mod:`django.contrib.auth` ~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.3