diff options
| author | Frederic Mheir <fredericmheir@Frederics-MacBook-Pro.local> | 2023-02-05 16:38:21 -0500 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-02-07 07:31:51 +0100 |
| commit | d70b2a88e8f1300c1564eb9e12822d5bf65ecaf0 (patch) | |
| tree | 16ffa0083b7ebbdcc34e546b132b9e388ce447a4 /django/contrib | |
| parent | edbc9d11ff07f4a87ac500b4a48dd06798cacbcf (diff) | |
[4.2.x] Fixed #34301 -- Made admin's submit_row check add permission for "Save as new" button.
Backport of 2878938626aed211d03db33a9a135c9b1d933069 from main
Diffstat (limited to 'django/contrib')
| -rw-r--r-- | django/contrib/admin/templatetags/admin_modify.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/admin/templatetags/admin_modify.py b/django/contrib/admin/templatetags/admin_modify.py index 9df4b7aadb..0e3046ae5a 100644 --- a/django/contrib/admin/templatetags/admin_modify.py +++ b/django/contrib/admin/templatetags/admin_modify.py @@ -100,7 +100,7 @@ def submit_row(context): and context.get("show_delete", True) ), "show_save_as_new": not is_popup - and has_change_permission + and has_add_permission and change and save_as, "show_save_and_add_another": can_save_and_add_another, |
