Code

Opened 5 years ago

Closed 5 years ago

#10624 closed (duplicate)

has_add_permission not working correctly

Reported by: anonymous Owned by: nobody
Component: Uncategorized Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

There's a remaining issue regarding ticket #5447. I added the method "def has_add_permission(*args):return False" to a ModelAdmin class, but the "Add" button stills appearing in the application page (http://mysite/myproject/admin/myapplication) next to the model.

It doesn't show up in the Home admin page (http://mysite/myproject/admin/), neither in the model modify page (http://mysite/myproject/admin/myapplication/somemodel), and also clicking in the "Add" button that appears in the application page, it shows the message "Permission denied", which is the expected behavior.

Attachments (0)

Change History (1)

comment:1 Changed 5 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

This is a dupe of #9036.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.