Re: [Django] #7599: add get_user_permissions method to ModelBackend

2 views
Skip to first unread message

Django

unread,
Aug 1, 2013, 9:55:46 AM8/1/13
to django-...@googlegroups.com
#7599: add get_user_permissions method to ModelBackend
------------------------------+------------------------------------
Reporter: gwilson | Owner:
Type: New feature | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------
Changes (by timo):

* needs_docs: 0 => 1


Comment:

Documentation isn't correct - this isn't a method on the `User` object,
but on rather on `ModelBackend` which is documented at the bottom of
`docs/ref/contrib/auth.txt`, although none of the methods for the backend
are documented so presumably if we documented this one we'd want to
document the rest. This ticket also has "needs tests" set, and while I
imagine we could test the ability to override the method in a custom
backend, I'm not convinced it's necessary as it doesn't look like the rest
of the backend is tested in such a way.

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

Django

unread,
Dec 30, 2013, 3:05:15 AM12/30/13
to django-...@googlegroups.com
#7599: add get_user_permissions method to ModelBackend
------------------------------+------------------------------------
Reporter: gwilson | Owner:
Type: New feature | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------

Comment (by jorgecarleitao):

timo is right. I added a pull request,
https://github.com/django/django/pull/2127, that fixes the docs of
ModelBackend and apply the patch.

I didn't added a test case because, like timo argued, the backend is not
tested anyway. I will fill a ticket reporting this.

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

Django

unread,
Dec 30, 2013, 3:05:47 AM12/30/13
to django-...@googlegroups.com
#7599: add get_user_permissions method to ModelBackend
------------------------------+------------------------------------
Reporter: gwilson | Owner:
Type: New feature | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------
Changes (by jorgecarleitao):

* cc: jorgecarleitao (added)


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

Django

unread,
May 5, 2014, 8:43:55 AM5/5/14
to django-...@googlegroups.com
#7599: add get_user_permissions method to ModelBackend
------------------------------+------------------------------------------
Reporter: gwilson | Owner: jorgecarleitao
Type: New feature | Status: assigned

Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------------
Changes (by jorgecarleitao):

* status: new => assigned
* owner: => jorgecarleitao


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

Django

unread,
Jun 5, 2014, 6:54:02 PM6/5/14
to django-...@googlegroups.com
#7599: add get_user_permissions method to ModelBackend
------------------------------+------------------------------------------
Reporter: gwilson | Owner: jorgecarleitao
Type: New feature | Status: assigned
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

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

* needs_docs: 1 => 0
* needs_tests: 1 => 0
* needs_better_patch: 0 => 1


Comment:

Please uncheck "Patch needs improvement" when you update the PR, thanks.

--
Ticket URL: <https://code.djangoproject.com/ticket/7599#comment:16>

Django

unread,
Jun 13, 2014, 3:52:24 AM6/13/14
to django-...@googlegroups.com
#7599: add get_user_permissions method to ModelBackend
------------------------------+------------------------------------------
Reporter: gwilson | Owner: jorgecarleitao
Type: New feature | Status: assigned
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* needs_better_patch: 1 => 0


Comment:

See
https://github.com/jorgecarleitao/django/commit/ac217515b5290b6bab8a7a78d38bf309e063b3f6

--
Ticket URL: <https://code.djangoproject.com/ticket/7599#comment:17>

Django

unread,
Jun 13, 2014, 9:37:22 AM6/13/14
to django-...@googlegroups.com
#7599: add get_user_permissions method to ModelBackend
------------------------------+------------------------------------------
Reporter: gwilson | Owner: jorgecarleitao
Type: New feature | Status: closed
Component: contrib.auth | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"cc35bd461d35da2b03c0a1a8ff92123d716db9a9"]:
{{{
#!CommitTicketReference repository=""
revision="cc35bd461d35da2b03c0a1a8ff92123d716db9a9"
Fixed #7599 -- Added get_user_permissions to ModelBackend.

Thanks to @gdub for the report and intial patch and
@charettes and @timgraham for the review.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/7599#comment:18>

Reply all
Reply to author
Forward
0 new messages