Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#26231 closed Bug (fixed)

Hint for non-staff users on admin page refers wrong attribute for username.

Reported by: Sjoerd Job Postmus Owned by: nobody
Component: contrib.admin Version: 1.9
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

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).

Change History (3)

comment:1 by Tim Graham, 8 years ago

Needs tests: set
Triage Stage: UnreviewedAccepted

PR needs a test.

comment:2 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: newclosed

In bbe136e:

Fixed #26231 -- Used .get_username in admin login template.

comment:3 by Tim Graham <timograham@…>, 8 years ago

In 911a77fc:

[1.9.x] Fixed #26231 -- Used .get_username in admin login template.

Backport of bbe136e1a2f9cbf3fd10d49fbe8558a5b394752c from master

Note: See TracTickets for help on using tickets.
Back to Top