Django

Code

Ticket #5650 (closed: duplicate)

Opened 1 year ago

Last modified 1 year ago

'Save and add another' is displayed even without add permission

Reported by: Silviu Julean <sjulean@gmail.com> Assigned to: nobody
Milestone: Component: django.contrib.admin
Version: newforms-admin Keywords: newforms admin add permission
Cc: dany@ideacentrum.eu Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

Even if a user does not have add permission for a certain model, the 'Save and add another' button (or 'Save as', according to the model admin save_as option) is displayed.

The expected behavior is to hide that button when the user doesn't have the add permission.

I have attached a (trivial) patch against newforms-admin r6442.

Attachments

skip_save_as_without_perm_r6442.patch (1.7 kB) - added by Silviu Julean <sjulean@gmail.com> on 10/01/07 06:12:36.
Initial patch against newforms-admin r6442
skip_save_as_without_perm_r6442.2.patch (1.8 kB) - added by Silviu Julean <sjulean@ideacentrum.eu> on 10/02/07 06:04:09.
New patch that doesn't crash on add

Change History

10/01/07 06:12:36 changed by Silviu Julean <sjulean@gmail.com>

  • attachment skip_save_as_without_perm_r6442.patch added.

Initial patch against newforms-admin r6442

10/01/07 12:44:26 changed by ubernostrum

  • status changed from new to closed.
  • needs_better_patch changed.
  • resolution set to duplicate.
  • needs_tests changed.
  • needs_docs changed.

Duplicate of #3817.

10/02/07 06:04:09 changed by Silviu Julean <sjulean@ideacentrum.eu>

  • attachment skip_save_as_without_perm_r6442.2.patch added.

New patch that doesn't crash on add


Add/Change #5650 ('Save and add another' is displayed even without add permission)




Change Properties
Action