[Django] #26231: Hint for non-staff users on admin page refers wrong attribute for username.

3 views
Skip to first unread message

Django

unread,
Feb 17, 2016, 10:27:18 AM2/17/16
to django-...@googlegroups.com
#26231: Hint for non-staff users on admin page refers wrong attribute for username.
-------------------------------+--------------------
Reporter: sjoerdjob | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.9
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------
In commit 635ffc3c37d58eb96ae17d5389dd50bf635413c6 a block was introduced
accessing `username` as `request.user.username`, but it should be accessed
using `request.user.get_username`. This breaks on custom models which do
not have a `username` attribute or property.

(marking with Has patch, because I submitted one on github already).

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

Django

unread,
Feb 17, 2016, 10:51:24 AM2/17/16
to django-...@googlegroups.com
#26231: Hint for non-staff users on admin page refers wrong attribute for username.
-------------------------------+------------------------------------

Reporter: sjoerdjob | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

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

* needs_better_patch: => 0
* needs_docs: => 0
* needs_tests: => 1
* stage: Unreviewed => Accepted


Comment:

[https://github.com/django/django/pull/6155 PR] needs a test.

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

Django

unread,
Feb 25, 2016, 7:30:34 PM2/25/16
to django-...@googlegroups.com
#26231: Hint for non-staff users on admin page refers wrong attribute for username.
-------------------------------+------------------------------------
Reporter: sjoerdjob | Owner: nobody
Type: Bug | Status: closed
Component: contrib.admin | Version: 1.9
Severity: Normal | Resolution: fixed

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

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


Comment:

In [changeset:"bbe136e1a2f9cbf3fd10d49fbe8558a5b394752c" bbe136e]:
{{{
#!CommitTicketReference repository=""
revision="bbe136e1a2f9cbf3fd10d49fbe8558a5b394752c"
Fixed #26231 -- Used .get_username in admin login template.
}}}

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

Django

unread,
Feb 25, 2016, 7:30:52 PM2/25/16
to django-...@googlegroups.com
#26231: Hint for non-staff users on admin page refers wrong attribute for username.
-------------------------------+------------------------------------
Reporter: sjoerdjob | Owner: nobody
Type: Bug | Status: closed
Component: contrib.admin | Version: 1.9

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"911a77fcca49a92d0750b7f7d573ea2dcf77a1a9" 911a77fc]:
{{{
#!CommitTicketReference repository=""
revision="911a77fcca49a92d0750b7f7d573ea2dcf77a1a9"
[1.9.x] Fixed #26231 -- Used .get_username in admin login template.

Backport of bbe136e1a2f9cbf3fd10d49fbe8558a5b394752c from master
}}}

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

Reply all
Reply to author
Forward
0 new messages