get_config_response = async (role_id, res, req) => {
  const state = getState();
  const maintenanceModeEnabled = state.getConfig("maintenance_mode_enabled", false);
  const maintenanceModePage = state.getConfig("maintenance_mode_page", "");

  if(maintenanceModeEnabled && (!req.user || req.user.role_id > 1) && maintenanceModePage) {
    const db_page = await Page.findOne({ name: maintenanceModePage });
    if (db_page) {
      res.sendWrap(
        {
          title: db_page.title,
          description: db_page.description,
          bodyClass: "page_" + db.sqlsanitize(maintenanceModePage),
        },
        await db_page.run(req.query, { res, req })
      );
      return true;
    } else {
      res.status(503).send("Page Unavailable: in maintenance mode");
      return true;
    }
  }

  const wrap = async (
    contents,
    homeCfg,
    title,
    description,
    no_menu,
    requestFluidLayout
  ) => {
    if (contents.html_file) await sendHtmlFile(req, res, contents.html_file);
    else
      res.sendWrap(
        {
          title: title || "",
          description: description || "",
          bodyClass: "page_" + db.sqlsanitize(homeCfg),
          no_menu,
          requestFluidLayout,
        },
        contents
      );
  };
  const modernCfg = getState().getConfig("home_page_by_role", false);
  // predefined roles
  const legacy_role = { 100: "public", 80: "user", 40: "staff", 1: "admin" }[
    role_id
  ];
  let homeCfg = modernCfg && modernCfg[role_id];
  if (typeof homeCfg !== "string")
    homeCfg = getState().getConfig(legacy_role + "_home");
  if (homeCfg) {
    const db_page = Page.findOne({ name: homeCfg });
    if (db_page)
      wrap(
        await db_page.run(req.query, { res, req }),
        homeCfg,
        db_page.title,
        db_page.description,
        db_page.attributes?.no_menu,
        db_page.attributes?.request_fluid_layout
      );
    else {
      const group = PageGroup.findOne({ name: homeCfg });
      if (group) {
        const eligible = await getEligiblePage(group, req, res);
        if (typeof eligible === "string") wrap(eligible);
        else if (eligible) {
          if (!eligible.isReload)
            wrap(
              await eligible.run(req.query, { res, req }),
              homeCfg,
              eligible.title,
              eligible.description,
              eligible.attributes?.no_menu,
              eligible.attributes?.request_fluid_layout
            );
        } else wrap(req.__("%s has no eligible page", group.name), homeCfg);
      } else res.redirect(homeCfg);
    }
    return true;
  }
}
Get Config respounce
@param {number} role_id
@param {object} res
@param {object} req
@returns {Promise<boolean>}