Opened 11 years ago

Closed 10 years ago

Last modified 10 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 Changed 11 years ago by fanatid

Has patch: set

comment:2 Changed 11 years ago by Aymeric Augustin

Triage Stage: UnreviewedAccepted

I reproduced the issue.

comment:3 Changed 11 years ago by Rickard Zachrisson

Tried patch and tests, works fine.

comment:4 Changed 11 years ago by Alexander Hansen

Patches and tests works, recommended for inclusion.

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

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 Changed 11 years ago by Kamil Gałuszka

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 Changed 11 years ago by Alexander Hansen

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

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

Triage Stage: AcceptedReady for checkin

Ok. After merging #18709 tests are passing.

comment:9 Changed 10 years ago by Tim Graham

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

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

comment:10 Changed 10 years ago by Tim Graham

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 10 years ago by Tim Graham (previous) (diff)

comment:11 Changed 10 years ago by Tim Graham

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

comment:12 Changed 10 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: newclosed

In 33242fe015a9519748cd328939dca3136f462344:

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

Thanks Tuttle for the report.

comment:13 Changed 10 years ago by Tim Graham <timograham@…>

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