Opened 10 years ago

Last modified 7 years ago

#24754 new New feature

Implementation of global permissions

Reported by: autrilla Owned by: nobody
Component: contrib.auth Version: dev
Severity: Normal Keywords:
Cc: me@…, Mariusz Felisiak Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
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 (6)

comment:1 by Aymeric Augustin, 10 years ago

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 by Tim Graham, 10 years ago

Triage Stage: UnreviewedAccepted
Version: 1.8master

comment:3 by Adam Johnson, 9 years ago

Cc: me@… added

comment:4 by Tim Graham, 7 years ago

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

comment:5 by Mariusz Felisiak, 7 years ago

Cc: Mariusz Felisiak added

comment:6 by Tim Graham, 7 years ago

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