Code

Opened 4 years ago

Last modified 3 years ago

#12441 new New feature

Delegate module permissions check to AdminSite

Reported by: alexkoshelev 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 alexkoshelev 4 years ago.
patch

Download all attachments as: .zip

Change History (8)

Changed 4 years ago by alexkoshelev

patch

comment:1 Changed 4 years ago by jezdez

  • Needs documentation unset
  • Needs tests set
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 4 years ago by alexkoshelev

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

  • milestone changed from 1.2 to 1.3

1.2 is feature-frozen. Punting to 1.3.

comment:4 Changed 3 years ago by alexkoshelev

  • Component changed from Contrib apps to django.contrib.admin

comment:5 Changed 3 years ago by mattmcc

  • milestone 1.3 deleted
  • Severity set to Normal
  • Type set to New feature

comment:6 Changed 2 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:7 Changed 2 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as new
The owner will be changed from nobody to anonymous. Next status will be 'assigned'
as The resolution will be set. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.