Opened 5 years ago

Last modified 3 years ago

#24754 new New feature

Implementation of global permissions

Reported by: autrilla Owned by: nobody
Component: contrib.auth Version: master
Severity: Normal Keywords:
Cc: me@…, felixxm Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no


Right now, there are two ways of creating Permissions, either through a Model's Meta class, or using the Permission.objects.create method. The problem is, both of this ways require having the permission attached to a model, even when sometimes it does not really make sense. There are ways to work around this, of course, such as creating a dummy model just to hold permissions that don't really fit anywhere or overriding the default User model and fitting them there. Possible solutions I can think of are either removing the mandatory ContentType specification on the Permission model or providing a 'global' ContentType.

Change History (6)

comment:1 Changed 5 years ago by Aymeric Augustin

Permissions were designed for the admin. It shows. I agree that it's an unfortunate design and we should try to do better. I've faced this issue repeatedly myself. In applications, not every concept is built upon a Django model!

comment:2 Changed 5 years ago by Tim Graham

Triage Stage: UnreviewedAccepted
Version: 1.8master

comment:3 Changed 5 years ago by Adam (Chainz) Johnson

Cc: me@… added

comment:4 Changed 3 years ago by Tim Graham

Has patch: set
Last edited 3 years ago by Tim Graham (previous) (diff)

comment:5 Changed 3 years ago by felixxm

Cc: felixxm added

comment:6 Changed 3 years ago by Tim Graham

Patch needs improvement: set
Note: See TracTickets for help on using tickets.
Back to Top