Opened 10 years ago

Closed 9 years ago

#2927 closed defect (duplicate)

[patch] In admin, user shouldn't see "add" buttons if they don't have the permission.

Reported by: SmileyChris Owned by: nobody
Component: contrib.admin Version:
Severity: normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

There's the save and add another button, and the add button next to the foreign key widget. Neither should show if the user doesn't have the correct permissions.

Attachments (4)

fix_admin_add_buttons.patch (3.8 KB) - added by SmileyChris 10 years ago.
Here's the patch to make this all work.
fix_admin_add_buttons.2.patch (4.0 KB) - added by SmileyChris 10 years ago.
less brittle patch as requested
fix_admin_add_buttons.3.patch (4.0 KB) - added by SmileyChris 10 years ago.
Oops, the real less brittle patch this time.
fix_admin_add_buttons.4.patch (3.9 KB) - added by SmileyChris 10 years ago.
Umm... third time's a charm... (turns out you have to save files before creating patch)

Download all attachments as: .zip

Change History (8)

Changed 10 years ago by SmileyChris

Here's the patch to make this all work.

comment:1 Changed 10 years ago by SmileyChris

  • Summary changed from In admin, user shouldn't see "add" buttons if they don't have the permission. to [patch] In admin, user shouldn't see "add" buttons if they don't have the permission.

comment:2 Changed 10 years ago by jacob

I like the concept, but reading the context (in admin_modify) isn't OK; template tags should not assume anything about the context. Can you rework the patch to be less brittle?

Changed 10 years ago by SmileyChris

less brittle patch as requested

Changed 10 years ago by SmileyChris

Oops, the real less brittle patch this time.

Changed 10 years ago by SmileyChris

Umm... third time's a charm... (turns out you have to save files before creating patch)

comment:3 Changed 9 years ago by Simon G. <dev@…>

  • Triage Stage changed from Unreviewed to Accepted

Does this need to be updated for newforms.admin?

comment:4 Changed 9 years ago by ubernostrum

  • Resolution set to duplicate
  • Status changed from new to closed

The popup part of this is a duplicate of #1035, and the buttons part is a duplicate of #3817. In the spirit of "one issue per ticket", I'm closing this one in favor of the two separate tickets.

Note: See TracTickets for help on using tickets.
Back to Top