Opened 7 years ago

Closed 2 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)

12441.diff (1.9 KB) - added by Alexander Koshelev 7 years ago.
patch

Download all attachments as: .zip

Change History (11)

Changed 7 years ago by Alexander Koshelev

Attachment: 12441.diff added

patch

comment:1 Changed 7 years ago by Jannis Leidel

Needs tests: set
Triage Stage: UnreviewedAccepted

comment:2 Changed 7 years ago by Alexander Koshelev

Needs tests: unset

I think that no additional tests are needed for this patch. All current admin's tests implicitly checks that changes.

comment:3 Changed 7 years ago by jkocherhans

milestone: 1.21.3

1.2 is feature-frozen. Punting to 1.3.

comment:4 Changed 6 years ago by Alexander Koshelev

Component: Contrib appsdjango.contrib.admin

comment:5 Changed 6 years ago by Matt McClanahan

milestone: 1.3
Severity: Normal
Type: New feature

comment:6 Changed 5 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:7 Changed 5 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:8 Changed 3 years ago by Tomek Paczkowski

Patch needs improvement: set

Patch no longer applies cleanly.

comment:9 Changed 2 years ago by Nick Sandford

Patch needs improvement: unset

comment:10 Changed 2 years ago by Nick Sandford

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top