async createFirstAdmin(request) {
    const adminExists = await global.kuzzle.ask(
      "core:security:user:admin:exist",
    );

    if (adminExists) {
      throw kerror.get("api", "process", "admin_exists");
    }

    const userId = request.getKuid();
    const content = request.getBodyObject("content", {});
    const reset = request.getBoolean("reset");
    const humanReadableId = request.getString("kuid", "human") !== "uuid";

    if (has(content, "profileIds")) {
      throw kerror.get(
        "api",
        "assert",
        "forbidden_argument",
        "body.content.profileIds",
      );
    }

    const user = await this._persistUser(request, ["admin"], content, {
      humanReadableId,
    });

    if (reset) {
      for (const type of ["role", "profile"]) {
        await Bluebird.map(
          Object.entries(global.kuzzle.config.security.standard[`${type}s`]),
          ([name, value]) =>
            this.ask(`core:security:${type}:createOrReplace`, name, value, {
              refresh: "wait_for",
              userId,
            }),
        );
      }
    }

    global.kuzzle.log.info(
      `[SECURITY] ${SecurityController.userOrSdk(userId)} applied action "${
        request.input.action
      }".`,
    );

    return user;
  }
Creates the first admin user if it does not already exist

@param {Request} request
@returns {Promise<Object>}