Opened 3 years ago

Last modified 2 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@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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 (3)

comment:1 Changed 3 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 3 years ago by Tim Graham

Triage Stage: UnreviewedAccepted
Version: 1.8master

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

Cc: me@… added
Note: See TracTickets for help on using tickets.
Back to Top