Opened 17 years ago

Closed 10 years ago

#6327 closed New feature (fixed)

Add has_module_permission to ModelAdmin

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

Download all attachments as: .zip

Change History (12)

by chrj, 17 years ago

Attachment: has_module_permission.diff added

comment:1 by anonymous, 17 years ago

Triage Stage: UnreviewedDesign decision needed

comment:2 by Julien Phalip, 14 years ago

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

comment:3 by Julien Phalip, 14 years ago

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 by Alex Gaynor, 13 years ago

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

comment:5 by Maxime Turcotte, 11 years ago

Owner: changed from nobody to Maxime Turcotte
Status: newassigned

comment:6 by Maxime Turcotte, 11 years ago

Owner: Maxime Turcotte removed
Status: assignednew

comment:7 by Maxime Turcotte, 10 years ago

Owner: set to Maxime Turcotte
Status: newassigned

comment:8 by Maxime Turcotte, 10 years ago

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

Here's my PR

comment:9 by Tim Graham, 10 years ago

Patch needs improvement: set

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

comment:10 by Maxime Turcotte, 10 years ago

Patch needs improvement: unset

Updated PR

comment:11 by Tim Graham <timograham@…>, 10 years ago

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