#9057 closed New feature (fixed)
Allow disabling contrib.auth auto creation of permissions
Reported by: | Henrik Vendelbo | Owned by: | nobody |
---|---|---|---|
Component: | contrib.auth | Version: | dev |
Severity: | Normal | Keywords: | auth |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
If you wan't to create permissions and a superuser automatically in your own it's easy. Just follow the pattern used in contrib.auth
Then all you need to do is make contrib.auth stop creating permissions and superuser as well
Attachments (3)
Change History (12)
by , 16 years ago
Attachment: | 9057.1.patch added |
---|
by , 16 years ago
Attachment: | 9057.2.patch added |
---|
Check settings before creating permissions and superuser
comment:1 by , 16 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
A few issue here:
- This patch seems to be trying to slip in a configurable user-model. I can't see how that's related to the problem at hand.
- One patch, please, not two. I looked at the last patch, thinking it was the most up-to-date version and it looked incomplete. Then I realised that I had to read both at once.
- I'm -1 on including this at the moment. It's two extra settings, plus documentation (which isn't included here) to support something that happens once at syncdb time. If you don't want those permissions you can go in and delete them or write a script to do so. I'm relatively unconvinced that there's a really large use-case that is being overlooked by this not being present.
comment:2 by , 15 years ago
While I'm not sure about the superuser part, I would find the ability to dissable auto-created permissions VERY usefull in the site I am currently designing.
Not only are there 3 permissions created per model, but the admin page does not even separate the auto-created ones from the purposely-created ones. My site has over 30 models (very complex research site) and having to go in and delete all the auto-created permissions every time I add a model is VERY annoying.
This seems like a simple fix and other than the missing tests/docs (which look like they would take all of 5 minutes to write), I am all for this.
comment:3 by , 14 years ago
Component: | Contrib apps → contrib.auth |
---|
comment:4 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → New feature |
comment:5 by , 13 years ago
Easy pickings: | unset |
---|---|
Needs documentation: | set |
UI/UX: | unset |
This patch has a different take: make it a meta option per model (called "no_default_permissions") to prevent creating the three default permissions for that model.
Added a test in a new folder regressiontests/auth_permissions since I did not know where to put them otherwise.
comment:6 by , 13 years ago
Triage Stage: | Design decision needed → Accepted |
---|
comment:7 by , 11 years ago
Needs documentation: | unset |
---|---|
Summary: | allow override of contrib.auth auto creation of permissions and superuser → Allow disabling contrib.auth auto creation of permissions |
Version: | 1.0 → master |
Updating existing patch: PR
comment:8 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Add extra global settings