Adjusted OIDC template, continue working on building client side app

This commit is contained in:
Donald Zou
2025-08-02 16:51:24 +08:00
parent 7322b7cbf0
commit b52bb83c67
8 changed files with 86 additions and 18 deletions

View File

@@ -23,7 +23,7 @@ class DashboardConfig:
def __init__(self):
if not os.path.exists(DashboardConfig.ConfigurationFilePath):
open(DashboardConfig.ConfigurationFilePath, "x")
self.__config = configparser.ConfigParser(strict=False)
self.__config = configparser.RawConfigParser(strict=False)
self.__config.read_file(open(DashboardConfig.ConfigurationFilePath, "r+"))
self.hiddenAttribute = ["totp_key", "auth_req"]
self.__default = {
@@ -76,6 +76,10 @@ class DashboardConfig:
"send_from": "",
"email_template": ""
},
"OIDC": {
"admin_enable": "false",
"client_enable": "false"
},
"WireGuardConfiguration": {
"autostart": ""
}
@@ -236,7 +240,7 @@ class DashboardConfig:
elif type(value) is list:
self.__config[section][key] = "||".join(value).strip("||")
else:
self.__config[section][key] = value
self.__config[section][key] = fr"{value}"
return self.SaveConfig(), ""
else:
return False, f"{key} does not exist under {section}"