Opened 9 years ago

Closed 2 years ago

#6327 closed New feature (fixed)

Add has_module_permission to ModelAdmin

Reported by: chrj Owned by: Maxime Turcotte
Component: contrib.admin Version: master
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

I think it's a bit odd that ModelAdmin has permission hooks for add, change and delete but not for the module. Is there a special reasoning behind this? I can't come up with a use case.

This patch will fix that.

Regards,
Christian

Attachments (1)

has_module_permission.diff (1.2 KB) - added by chrj 9 years ago.

Download all attachments as: .zip

Change History (12)

Changed 9 years ago by chrj

Attachment: has_module_permission.diff added

comment:1 Changed 9 years ago by anonymous

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedDesign decision needed

comment:2 Changed 5 years ago by Julien Phalip

Needs documentation: set
Needs tests: set
Severity: Normal
Type: New feature

comment:3 Changed 5 years ago by Julien Phalip

Patch needs improvement: set

Also note that the admin's code has changed greatly since 3 years ago, so the patch needs to be updated.

comment:4 Changed 5 years ago by Alex Gaynor

Easy pickings: unset
Keywords: newforms-admin removed
Triage Stage: Design decision neededAccepted
UI/UX: unset
Version: newforms-adminSVN

comment:5 Changed 2 years ago by Maxime Turcotte

Owner: changed from nobody to Maxime Turcotte
Status: newassigned

comment:6 Changed 2 years ago by Maxime Turcotte

Owner: Maxime Turcotte deleted
Status: assignednew

comment:7 Changed 2 years ago by Maxime Turcotte

Owner: set to Maxime Turcotte
Status: newassigned

comment:8 Changed 2 years ago by Maxime Turcotte

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

Here's my PR

comment:9 Changed 2 years ago by Tim Graham

Patch needs improvement: set

Left comments for improvement on PR. Please uncheck "Patch needs improvement" when you update it, thanks.

comment:10 Changed 2 years ago by Maxime Turcotte

Patch needs improvement: unset

Updated PR

comment:11 Changed 2 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In 504c89e8008c557a1e83c45535b549f77a3503b2:

Fixed #6327 -- Added has_module_permission method to BaseModelAdmin

Thanks chrj for the suggestion.

Note: See TracTickets for help on using tickets.
Back to Top