Comment 4 for bug 912143

Tihomir Trifonov (ttrifonov) wrote :

In addition to the 'update_user_email' bug - probably the conditions in oksadmin:

mapper.connect("/users/{user_id}",
                    controller=user_controller,
                    action="update_user",
                    conditions=dict(method=["POST"]))

should be "PUT", but this doesn't solve the problem yet. 'Update user' expects username, so it needs further improvement in novaclient/keystone/users:UserManager:

class UserManager(base.ManagerWithFind):
...
def update_email(self, user, username, email):

and in Horizon/api/keystone.py:

def user_update_email(request, user_id, username, email):
    return User(keystoneclient(request).users.update_email(user_id, username, email))

because of keystone/logic/service.py:

class IdentityService(object):
....
   @admin_token_validator
    def update_user(self, admin_token, user_id, user):
 ...
        utils.check_empty_string(user.name,
                "Expecting a unique username")