[Django] #20605: Custom base permissions

6 views
Skip to first unread message

Django

unread,
Jun 15, 2013, 4:06:35 AM6/15/13
to django-...@googlegroups.com
#20605: Custom base permissions
------------------------------+--------------------
Reporter: philipn | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: 1.5
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+--------------------
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
`contrib.auth.management` to accomplish this.

Currently using this workaround: http://blog.nyaruka.com/adding-a-view-
permission-to-django-models

--
Ticket URL: <https://code.djangoproject.com/ticket/20605>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 16, 2013, 2:22:55 AM6/16/13
to django-...@googlegroups.com
#20605: Custom base permissions
------------------------------+------------------------------------

Reporter: philipn | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------
Changes (by akaariai):

* needs_better_patch: => 0
* version: 1.5 => master
* needs_docs: => 0
* needs_tests: => 0
* stage: Unreviewed => Accepted


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/20605#comment:1>

Django

unread,
Jul 28, 2015, 6:23:27 PM7/28/15
to django-...@googlegroups.com
#20605: Allow extending the default auth permissions
------------------------------+------------------------------------

Reporter: philipn | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------

Comment (by timgraham):

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

--
Ticket URL: <https://code.djangoproject.com/ticket/20605#comment:2>

Django

unread,
Aug 7, 2015, 6:51:10 AM8/7/15
to django-...@googlegroups.com
#20605: Allow extending the default auth permissions
------------------------------+------------------------------------
Reporter: philipn | Owner: nobody
Type: New feature | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------
Changes (by adamchainz):

* cc: me@… (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/20605#comment:3>

Reply all
Reply to author
Forward
0 new messages