Opened 7 years ago

Last modified 5 years ago

#20605 new New feature

Allow extending the default auth permissions

Reported by: philipn 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


Currently, Django provides 'change', 'add', and 'delete' as base permissions which are created on syncdb. I know you can set custom permissions on a per-model basis by listing them in Meta, but sometimes you want a global base permission, e.g. 'view' (this is my use case).

It looks like it may be possible to just use a setting variable in to accomplish this.

Currently using this workaround:

Change History (3)

comment:1 Changed 7 years ago by Anssi Kääriäinen

Triage Stage: UnreviewedAccepted
Version: 1.5master

I don't see a reason to object to this request, so marking as accepted. And, 'view' permission is such a fundamental permission it is a bit strange that isn't available by default. At least being able to add it if needed would be a good thing...

A new global setting is likely going to be objected. Maybe after app-loading refactor this will be easier to tackle... Or maybe there could be some other API for adding permissions. For example, Permission model contains list of default permissions + a method to add more to that list.

comment:2 Changed 5 years ago by Tim Graham

Summary: Custom base permissionsAllow extending the default auth permissions

#25087 is a duplicate with a patch (but as a setting).

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

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