#9646 closed (fixed)
contrib.admin does app index page does not check ModelAdmin.has_add_permission(request)
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Keywords: | ||
Cc: | petar.maric@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The permission checks implemented in the app index page for contrib admin assume that the site is using default Django contrib.auth permssions[1]. On sites with overridden ModelAdmin.has_add_permission [3] this means that the wrong perm string will be checked.
The proposed patch simply makes AdminSite.app_index do the check in the same way as AdminSite.index [2] so that ModelAdmin auth mechanism will be invoked.
[1]: http://code.djangoproject.com/browser/django/trunk/django/contrib/admin/sites.py#L343
[2]: http://code.djangoproject.com/browser/django/trunk/django/contrib/admin/sites.py#L279
[3]: http://code.djangoproject.com/browser/django/trunk/django/contrib/admin/options.py#L211
Attachments (1)
Change History (5)
by , 16 years ago
Attachment: | ticket-9646.diff added |
---|
comment:1 by , 16 years ago
milestone: | → 1.1 |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 16 years ago
Cc: | added |
---|
comment:3 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Change app_index permission checks to match index's checks