Skip to content

Commit

Permalink
CB-5574 adds secret manager depending on the setting
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyteleshev committed Dec 25, 2024
1 parent fb70b44 commit 1790f5f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions webapp/packages/core-root/src/ServerConfigResource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ export class ServerConfigResource extends CachedDataResource<ServerConfig | null
return this.data?.resourceManagerEnabled ?? false;
}

get secretManagerEnabled() {
return this.data?.secretManagerEnabled ?? false;
}

isBetaFeatureDisabled(feature: string): boolean {
return this.data?.disabledBetaFeatures?.includes(feature) || false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const defaultServerConfig: (productConfiguration?: Record<string, any>) =
anonymousAccessEnabled: true,
adminCredentialsSaveEnabled: true,
publicCredentialsSaveEnabled: true,
secretManagerEnabled: true,
resourceManagerEnabled: true,
licenseRequired: false,
licenseValid: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ fragment ServerConfig on ServerConfig {
publicCredentialsSaveEnabled

resourceManagerEnabled
secretManagerEnabled

configurationMode
developmentMode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const ServerConfigurationFormPartStateConfigSchema = schema.object({
enabledFeatures: schema.array(schema.string()).optional(),
publicCredentialsSaveEnabled: schema.boolean().optional(),
resourceManagerEnabled: schema.boolean().optional(),
secretManagerEnabled: schema.boolean().optional(),
serverName: schema.string().optional(),
serverURL: schema.string().optional(),
sessionExpireTime: schema.number().optional(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ function DEFAULT_STATE_GETTER(): IServerConfigurationFormPartState {
enabledFeatures: [],
publicCredentialsSaveEnabled: false,
resourceManagerEnabled: false,
secretManagerEnabled: false,
serverName: '',
serverURL: '',
sessionExpireTime: MIN_SESSION_EXPIRE_TIME * 1000 * 60,
Expand Down Expand Up @@ -147,6 +148,7 @@ export class ServerConfigurationFormPart extends FormPart<IServerConfigurationFo
anonymousAccessEnabled: config?.anonymousAccessEnabled ?? false,
enabledFeatures: config?.enabledFeatures ? [...config.enabledFeatures] : [],
resourceManagerEnabled: config?.resourceManagerEnabled ?? false,
secretManagerEnabled: config?.secretManagerEnabled ?? false,
},
navigatorConfig: { ...this.state.navigatorConfig, ...defaultNavigatorSettings },
});
Expand Down

0 comments on commit 1790f5f

Please sign in to comment.