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