Просмотр исходного кода

Merge pull request #9732 from weseek/fix/162942-saml-authentication-error

fix: SAML authentication error
Yuki Takei 1 год назад
Родитель
Сommit
7f8c11218c

+ 0 - 4
apps/app/src/server/service/config-manager/config-definition.ts

@@ -207,7 +207,6 @@ export const CONFIG_KEYS = [
   'customize:highlightJsStyle',
   'customize:highlightJsStyleBorder',
   'customize:theme',
-  'customize:theme:forcedColorScheme',
   'customize:isContainerFluid',
   'customize:isEnabledTimeline',
   'customize:isEnabledAttachTitleHeader',
@@ -938,9 +937,6 @@ export const CONFIG_DEFINITIONS = {
   'customize:theme': defineConfig<string>({
     defaultValue: 'default',
   }),
-  'customize:theme:forcedColorScheme': defineConfig<string | null>({
-    defaultValue: null,
-  }),
   'customize:isContainerFluid': defineConfig<boolean>({
     defaultValue: false,
   }),

+ 1 - 1
apps/app/src/server/service/config-manager/config-loader.ts

@@ -44,7 +44,7 @@ export class ConfigLoader implements IConfigLoader<ConfigKey, ConfigValues> {
     for (const doc of docs) {
       dbConfig[doc.key as ConfigKey] = {
         definition: (doc.key in CONFIG_DEFINITIONS) ? CONFIG_DEFINITIONS[doc.key as ConfigKey] : undefined,
-        value: doc.value ? JSON.parse(doc.value) : null,
+        value: doc.value != null ? JSON.parse(doc.value) : null,
       };
     }
 

+ 1 - 1
apps/app/src/server/service/config-manager/config-manager.ts

@@ -81,7 +81,7 @@ export class ConfigManager implements IConfigManagerForApp, S2sMessageHandlable
     return (
       this.shouldUseEnvOnly(key)
         ? this.envConfig[key]?.value
-        : (this.dbConfig[key] ?? this.envConfig[key])?.value
+        : this.dbConfig[key]?.value ?? this.envConfig[key]?.value
     ) as ConfigValues[K];
   }