mirror of
https://github.com/ansible/awx.git
synced 2026-05-17 06:17:36 -02:30
Fix to only update the user's password if a non-empty password string is provided.
This commit is contained in:
@@ -629,7 +629,7 @@ class UserDetail(BaseDetail):
|
|||||||
if changed:
|
if changed:
|
||||||
raise PermissionDenied('Cannot change %s' % ', '.join(changed.keys()))
|
raise PermissionDenied('Cannot change %s' % ', '.join(changed.keys()))
|
||||||
|
|
||||||
if 'password' in request.DATA:
|
if 'password' in request.DATA and request.DATA['password']:
|
||||||
obj.set_password(request.DATA['password'])
|
obj.set_password(request.DATA['password'])
|
||||||
obj.save()
|
obj.save()
|
||||||
request.DATA.pop('password')
|
request.DATA.pop('password')
|
||||||
|
|||||||
Reference in New Issue
Block a user