2
0
itizawa 5 жил өмнө
parent
commit
9fed729d51

+ 11 - 0
src/server/service/config-manager.js

@@ -24,6 +24,12 @@ const KEYS_FOR_SAML_USE_ONLY_ENV_OPTION = [
   'security:passport-saml:ABLCRule',
 ];
 
+const KEYS_FOR_GCP_USE_ONLY_ENV_OPTION = [
+  'gcs:apiKeyJsonPath',
+  'gcs:bucket',
+  'gcs:uploadNamespace',
+];
+
 class ConfigManager extends S2sMessageHandlable {
 
   constructor(configModel) {
@@ -218,6 +224,11 @@ class ConfigManager extends S2sMessageHandlable {
         KEYS_FOR_SAML_USE_ONLY_ENV_OPTION.includes(key)
         && this.defaultSearch('crowi', 'security:passport-saml:useOnlyEnvVarsForSomeOptions')
       )
+      // gcp strategy
+      || (
+        KEYS_FOR_GCP_USE_ONLY_ENV_OPTION.includes(key)
+        && this.searchOnlyFromEnvVarConfigs('crowi', 'gcs:isGcpEnvPrioritizes')
+      )
     ));
   }