Opened 7 years ago

Closed 12 months ago

#6327 closed New feature (fixed)

Add has_module_permission to ModelAdmin

Reported by: chrj Owned by: maxocub
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 7 years ago.

Download all attachments as: .zip

Change History (12)

Changed 7 years ago by chrj

comment:1 Changed 7 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

comment:2 Changed 4 years ago by julien

  • Needs documentation set
  • Needs tests set
  • Severity set to Normal
  • Type set to New feature

comment:3 Changed 4 years ago by julien

  • 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 4 years ago by Alex

  • Easy pickings unset
  • Keywords newforms-admin removed
  • Triage Stage changed from Design decision needed to Accepted
  • UI/UX unset
  • Version changed from newforms-admin to SVN

comment:5 Changed 13 months ago by maxocub

  • Owner changed from nobody to maxocub
  • Status changed from new to assigned

comment:6 Changed 13 months ago by maxocub

  • Owner maxocub deleted
  • Status changed from assigned to new

comment:7 Changed 12 months ago by maxocub

  • Owner set to maxocub
  • Status changed from new to assigned

comment:8 Changed 12 months ago by maxocub

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Here's my PR

comment:9 Changed 12 months ago by timo

  • Patch needs improvement set

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

comment:10 Changed 12 months ago by maxocub

  • Patch needs improvement unset

Updated PR

comment:11 Changed 12 months ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

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