mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 15:21:13 +03:00
Merge pull request #2486 from rooftopcellist/fix_change_pass
selectively clear sesh on pass change
This commit is contained in:
commit
6ac17c874f
@ -925,6 +925,7 @@ class UserSerializer(BaseSerializer):
|
||||
if new_password:
|
||||
obj.set_password(new_password)
|
||||
obj.save(update_fields=['password'])
|
||||
if self.context['request'].user != obj:
|
||||
UserSessionMembership.clear_session_for_user(obj)
|
||||
elif not obj.password:
|
||||
obj.set_unusable_password()
|
||||
|
Loading…
Reference in New Issue
Block a user