'Update a single user.
The PATCH data should be an application/json object with attributes to
set to new values: password (string), project (string),
enabled (boolean).
A PATCH may contain any one of those attributes, but
if it contains more than one it must contain the project, even
if it is not being altered.
This method returns HTTP 204 (no content) on success.'

@rest_utils.ajax(data_required=True)
def patch(self, request, id):

    keys = tuple(request.DATA)
    user = api.keystone.user_get(request, id)
    if ('password' in keys):
        password = request.DATA['password']
        api.keystone.user_update_password(request, user, password)
    elif ('enabled' in keys):
        enabled = request.DATA['enabled']
        api.keystone.user_update_enabled(request, user, enabled)
    else:
        api.keystone.user_update(request, user, **request.DATA)
