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.
This commit is contained in:
sai-ganesh-03 2024-11-07 16:01:14 +05:30 committed by Sarah Boyce
parent ef8ae06c2a
commit c12bc980e5
4 changed files with 143 additions and 7 deletions

View file

@ -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
==============