Opened 18 years ago

Closed 17 years ago

#2927 closed defect (duplicate)

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

Reported by: Chris Beaven 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: no UI/UX: no

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 Chris Beaven 18 years ago.
Here's the patch to make this all work.
fix_admin_add_buttons.2.patch (4.0 KB ) - added by Chris Beaven 18 years ago.
less brittle patch as requested
fix_admin_add_buttons.3.patch (4.0 KB ) - added by Chris Beaven 18 years ago.
Oops, the real less brittle patch this time.
fix_admin_add_buttons.4.patch (3.9 KB ) - added by Chris Beaven 18 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)

by Chris Beaven, 18 years ago

Attachment: fix_admin_add_buttons.patch added

Here's the patch to make this all work.

comment:1 by Chris Beaven, 18 years ago

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

comment:2 by Jacob, 18 years ago

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?

by Chris Beaven, 18 years ago

less brittle patch as requested

by Chris Beaven, 18 years ago

Oops, the real less brittle patch this time.

by Chris Beaven, 18 years ago

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

comment:3 by Simon G. <dev@…>, 18 years ago

Triage Stage: UnreviewedAccepted

Does this need to be updated for newforms.admin?

comment:4 by James Bennett, 17 years ago

Resolution: duplicate
Status: newclosed

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