summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorsai-ganesh-03 <sandursaiganesh@gmail.com>2024-11-07 16:01:14 +0530
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2024-11-11 16:56:03 +0100
commitc12bc980e5b2bb25e447cd8dee550cad767f1ad2 (patch)
tree1930e01b7921b0ce96d900d0975ef8e1689ba1a2 /docs
parentef8ae06c2acd7b3673fee15b379213169153c7b0 (diff)
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.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/contrib/admin/admindocs.txt16
-rw-r--r--docs/releases/5.2.txt4
2 files changed, 15 insertions, 5 deletions
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 <link>```. See :ref:`documentation helpers
<admindocs-helpers>` for more details.
-
+
+* The :ref:`model pages <admindocs-model-reference>` are now restricted to only
+ allow access to users with the corresponding model view or change permissions.
:mod:`django.contrib.auth`
~~~~~~~~~~~~~~~~~~~~~~~~~~