Code

Opened 22 months ago

Closed 12 months ago

Last modified 12 months ago

#19019 closed New feature (fixed)

UserAdmin.user_change_password does not log the change

Reported by: Tuttle Owned by: nobody
Component: contrib.auth Version: master
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.

Attachments (0)

Change History (13)

comment:1 Changed 21 months ago by fanatid

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 20 months ago by aaugustin

  • Triage Stage changed from Unreviewed to Accepted

I reproduced the issue.

comment:3 Changed 20 months ago by Rizach

Tried patch and tests, works fine.

comment:4 Changed 14 months ago by wckd

Patches and tests works, recommended for inclusion.

comment:5 Changed 14 months ago by galuszkak

  • 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 14 months ago by galuszkak (previous) (diff)

comment:6 Changed 14 months ago by galuszkak

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 14 months ago by wckd

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

comment:8 Changed 14 months ago by galuszkak

  • Triage Stage changed from Accepted to Ready for checkin

Ok. After merging #18709 tests are passing.

comment:9 Changed 13 months ago by timo

  • Cc timograham@… added
  • Patch needs improvement set
  • Triage Stage changed from Ready for checkin to Accepted

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

comment:10 Changed 12 months ago by timo

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

Version 0, edited 12 months ago by timo (next)

comment:11 Changed 12 months ago by timo

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

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

  • Resolution set to fixed
  • Status changed from new to closed

In 33242fe015a9519748cd328939dca3136f462344:

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

Thanks Tuttle for the report.

comment:13 Changed 12 months 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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.