

def delete(self, *args):
    if ((not self.api_key.can_create_user()) and (self.key_username != args[0])):
        raise HTTPError(403)
    if (not self.auth_mgr.has_user(args[0])):
        raise HTTPError(404)
    try:
        self.auth_mgr.delete_user(args[0])
    except UserNotFound:
        raise HTTPError(404)
    self.write({
        'ok': True,
    })

dataset/ETHPy150Open benoitc/gaffer/gaffer/gafferd/http_handlers/user.py UserHandler.delete/original