Opened 15 years ago
Closed 10 years ago
#12441 closed New feature (fixed)
Delegate module permissions check to AdminSite
Reported by: | Alexander Koshelev | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | 1.1 |
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
Just now only ModelAdmin
has method like has_model_perms
to check current user (more generic - request) permissions. But AdminSite
checks module (application) permissions directly by accessing user's has_module_perms
.
Given patch extracts this check to AdminSite
method -- has_module_perms
. That allows to use custom permission management subsystem to use in the entire admin interface.
Attachments (1)
Change History (11)
by , 15 years ago
Attachment: | 12441.diff added |
---|
comment:1 by , 15 years ago
Needs tests: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 15 years ago
Needs tests: | unset |
---|
I think that no additional tests are needed for this patch. All current admin's tests implicitly checks that changes.
comment:4 by , 14 years ago
Component: | Contrib apps → django.contrib.admin |
---|
comment:5 by , 14 years ago
milestone: | 1.3 |
---|---|
Severity: | → Normal |
Type: | → New feature |
comment:9 by , 10 years ago
Patch needs improvement: | unset |
---|
Looks like this is fixed in master as of https://github.com/django/django/commit/504c89e8008c557a1e83c45535b549f77a3503b2.
comment:10 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
patch