Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#19019 closed New feature (fixed)

UserAdmin.user_change_password does not log the change

Reported by: Vlada Macek Owned by: nobody
Component: contrib.auth Version: dev
Severity: Normal Keywords:
Cc: galuszkak@…, timograham@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

I found myself missing the LogEntry added when the user password is changed through the admin. Calling self.log_change with save() would be nice.

Change History (13)

comment:1 by fanatid, 11 years ago

Has patch: set

comment:2 by Aymeric Augustin, 11 years ago

Triage Stage: UnreviewedAccepted

I reproduced the issue.

comment:3 by Rickard Zachrisson, 11 years ago

Tried patch and tests, works fine.

comment:4 by Alexander Hansen, 11 years ago

Patches and tests works, recommended for inclusion.

comment:5 by Kamil Gałuszka, 11 years ago

Cc: galuszkak@… added

wckd: Tests doesn't work actualy with master.

AssertionError: u'Changed last_login and date_joined.' != 'No fields changed.'
AssertionError: u'Changed email, last_login and date_joined.' != 'Changed email.'
Last edited 11 years ago by Kamil Gałuszka (previous) (diff)

comment:6 by Kamil Gałuszka, 11 years ago

Test are broken because of this #18709 . Waiting for someone to check and merge #18709.

Then we could resolve this problem in tests.

comment:7 by Alexander Hansen, 11 years ago

My fault, tested with an older install of django I had, sorry.

comment:8 by Kamil Gałuszka, 11 years ago

Triage Stage: AcceptedReady for checkin

Ok. After merging #18709 tests are passing.

comment:9 by Tim Graham, 11 years ago

Cc: timograham@… added
Patch needs improvement: set
Triage Stage: Ready for checkinAccepted

Left some comments on the pull request, needs minor tweaks.

comment:10 by Tim Graham, 11 years ago

Patch needs improvement: unset

Here's an updated pull request. As the test demonstrates and as I noticed testing another project, the dated_joined and last_login fields always appear in the list of fields that have changed -- it looks like a separate bug.

Last edited 11 years ago by Tim Graham (previous) (diff)

comment:11 by Tim Graham, 11 years ago

Filed #20781 for the bug mentioned in the previous comment.

comment:12 by Tim Graham <timograham@…>, 11 years ago

Resolution: fixed
Status: newclosed

In 33242fe015a9519748cd328939dca3136f462344:

Fixed #19019 -- Fixed UserAdmin to log password change.

Thanks Tuttle for the report.

comment:13 by Tim Graham <timograham@…>, 11 years ago

In ad898453b71d231402684c9e165bd4df9a1cfb76:

[1.6.x] Fixed #19019 -- Fixed UserAdmin to log password change.

Thanks Tuttle for the report.

Backport of 33242fe015 from master

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