Merge "Fix changing user's own password" into stable/rocky

This commit is contained in:
Zuul 2018-10-30 16:55:43 +00:00 committed by Gerrit Code Review
commit bd324c0405
1 changed files with 2 additions and 1 deletions

View File

@ -566,10 +566,11 @@ def user_verify_admin_password(request, admin_password):
@profiler.trace
def user_update_own_password(request, origpassword, password):
client = keystoneclient(request, admin=False)
client.user_id = request.user.id
if VERSIONS.active < 3:
client.user_id = request.user.id
return client.users.update_own_password(origpassword, password)
else:
client.users.client.session.auth.user_id = request.user.id
return client.users.update_password(origpassword, password)