#34301: "show_save_as_new" in admin can add without this permission
-----------------------------------------+-------------------------
               Reporter:  zarafalcao     |          Owner:  nobody
                   Type:  Bug            |         Status:  new
              Component:  contrib.admin  |        Version:  4.1
               Severity:  Normal         |       Keywords:  save_as
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  1
                  UI/UX:  0              |
-----------------------------------------+-------------------------
 At "django/contrib/admin/templatetags/admin_modify.py" file, line 102, I
 think you must put one more verification for this tag: "and
 has_add_permission", because "save_as_new" is a add modification.

 I rewrite this for my project:
 "
             "show_save_as_new": not is_popup
             and has_add_permission  # This line that I put!!!
             and has_change_permission
             and change
             and save_as,
  "

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34301>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070185ff06d8d3-d29f167a-d76d-4b84-a928-42a8c8e9bf96-000000%40eu-central-1.amazonses.com.

Reply via email to