Re: [Django] #10686: 2 simple improvements to permission inheritance.

6 views
Skip to first unread message

Django

unread,
Mar 22, 2013, 8:01:07 PM3/22/13
to django-...@googlegroups.com
#10686: 2 simple improvements to permission inheritance.
-------------------------------------+-------------------------------------
Reporter: faldridge | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: permissions | Needs documentation: 0
inheritance | Patch needs improvement: 0
Has patch: 1 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by akaariai):

* stage: Design decision needed => Accepted


Comment:

Seems like good changes to me.

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

Django

unread,
May 18, 2013, 9:27:00 AM5/18/13
to django-...@googlegroups.com
#10686: 2 simple improvements to permission inheritance.
-------------------------------------+-------------------------------------
Reporter: faldridge | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: permissions | Needs documentation: 0
inheritance | Patch needs improvement: 0
Has patch: 1 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by derega):

I managed to write tests for the new functionality described in this
ticket.

https://github.com/derega/django/tree/ticket_10686

--
Ticket URL: <https://code.djangoproject.com/ticket/10686#comment:7>

Django

unread,
Jul 28, 2013, 7:52:48 PM7/28/13
to django-...@googlegroups.com
#10686: 2 simple improvements to permission inheritance.
-------------------------------------+-------------------------------------
Reporter: faldridge | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: permissions | Needs documentation: 1

inheritance | Patch needs improvement: 0
Has patch: 1 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by timo):

* needs_docs: 0 => 1


Comment:

These changes also need to be documented.

--
Ticket URL: <https://code.djangoproject.com/ticket/10686#comment:8>

Django

unread,
Feb 1, 2016, 11:13:04 AM2/1/16
to django-...@googlegroups.com
#10686: 2 simple improvements to permission inheritance.
-------------------------------------+-------------------------------------
Reporter: faldridge | Owner: sergei-
| maertens
Type: New feature | Status: assigned

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: permissions | Triage Stage: Accepted
inheritance |
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by sergei-maertens):

* owner: nobody => sergei-maertens
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/10686#comment:9>

Django

unread,
Feb 1, 2016, 11:13:30 AM2/1/16
to django-...@googlegroups.com
#10686: 2 simple improvements to permission inheritance.
-------------------------------------+-------------------------------------
Reporter: faldridge | Owner: sergei-
| maertens
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: permissions | Triage Stage: Accepted
inheritance |
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by sergei-maertens):

I'm going to apply the patch to current master and add documentation
updates.

--
Ticket URL: <https://code.djangoproject.com/ticket/10686#comment:10>

Django

unread,
Feb 1, 2016, 12:27:46 PM2/1/16
to django-...@googlegroups.com
#10686: 2 simple improvements to permission inheritance.
-------------------------------------+-------------------------------------
Reporter: faldridge | Owner: sergei-
| maertens
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: permissions | Triage Stage: Accepted
inheritance |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by sergei-maertens):

* needs_docs: 1 => 0


Comment:

Applied the patch to current master and I've added documentation.

--
Ticket URL: <https://code.djangoproject.com/ticket/10686#comment:11>

Django

unread,
Feb 5, 2016, 11:53:50 AM2/5/16
to django-...@googlegroups.com
#10686: 2 simple improvements to permission inheritance.
-------------------------------------+-------------------------------------
Reporter: faldridge | Owner: sergei-
| maertens
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: permissions | Triage Stage: Accepted
inheritance |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

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

* needs_better_patch: 0 => 1


Comment:

[https://groups.google.com/d/topic/django-
developers/imjaHrfk6Eo/discussion django-developers discussion] which
suggests to avoid the proposed `inherit_permissions` `Meta` option.

--
Ticket URL: <https://code.djangoproject.com/ticket/10686#comment:12>

Django

unread,
Jul 2, 2016, 4:39:25 AM7/2/16
to django-...@googlegroups.com
#10686: 2 simple improvements to permission inheritance.
-------------------------------------+-------------------------------------
Reporter: faldridge | Owner: sergei-
| maertens
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: permissions | Triage Stage: Accepted
inheritance |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by sergei-maertens):

I'm starting work on this again such that `inherit_permissions` is not
needed.

Models inheriting from abstract models inherit the `Meta`, so unless
permissions are being added in the concrete model, there is no boilerplate
required. In the event that the concrete class also has custom
permissions, the pythonic way is the way to go:

{{{
class Task(BaseTask):
...

class Meta(BaseTask.Meta):
permissions = BaseTask.Meta.permissions + (
('reassign_assignedtask', 'Can reassign assigned task')
)
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/10686#comment:13>

Django

unread,
Jul 2, 2016, 5:38:43 AM7/2/16
to django-...@googlegroups.com
#10686: 2 simple improvements to permission inheritance.
-------------------------------------+-------------------------------------
Reporter: faldridge | Owner: sergei-
| maertens
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: permissions | Triage Stage: Accepted
inheritance |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by sergei-maertens):

Addition: it's not possible to inherit a concrete class' `Meta` per
https://docs.djangoproject.com/en/1.9/topics/db/models/#meta-and-multi-
table-inheritance

--
Ticket URL: <https://code.djangoproject.com/ticket/10686#comment:14>

Django

unread,
Jul 2, 2016, 5:58:06 AM7/2/16
to django-...@googlegroups.com
#10686: 2 simple improvements to permission inheritance.
-------------------------------------+-------------------------------------
Reporter: faldridge | Owner: sergei-
| maertens
Type: New feature | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: permissions | Triage Stage: Accepted
inheritance |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/10686#comment:15>

Reply all
Reply to author
Forward
0 new messages