Created two new env variables (#2120)
* created the two env variables * modify according to comments
This commit is contained in:
@ -41,6 +41,12 @@ export class ClientConfig {
|
||||
@Field(() => Boolean)
|
||||
signInPrefilled: boolean;
|
||||
|
||||
@Field(() => Boolean)
|
||||
dataModelSettingsEnabled: boolean;
|
||||
|
||||
@Field(() => Boolean)
|
||||
developersSettingsEnabled: boolean;
|
||||
|
||||
@Field(() => Boolean)
|
||||
debugMode: boolean;
|
||||
|
||||
|
||||
@ -22,6 +22,10 @@ export class ClientConfigResolver {
|
||||
this.environmentService.isTelemetryAnonymizationEnabled(),
|
||||
},
|
||||
signInPrefilled: this.environmentService.isSignInPrefilled(),
|
||||
dataModelSettingsEnabled:
|
||||
this.environmentService.isDataModelSettingsEnabled(),
|
||||
developersSettingsEnabled:
|
||||
this.environmentService.isDevelopersSettingsEnabled(),
|
||||
debugMode: this.environmentService.isDebugMode(),
|
||||
flexibleBackendEnabled:
|
||||
this.environmentService.isFlexibleBackendEnabled(),
|
||||
|
||||
@ -19,6 +19,18 @@ export class EnvironmentService {
|
||||
return this.configService.get<boolean>('SIGN_IN_PREFILLED') ?? false;
|
||||
}
|
||||
|
||||
isDataModelSettingsEnabled(): boolean {
|
||||
return (
|
||||
this.configService.get<boolean>('IS_DATA_MODEL_SETTINGS_ENABLED') ?? false
|
||||
);
|
||||
}
|
||||
|
||||
isDevelopersSettingsEnabled(): boolean {
|
||||
return (
|
||||
this.configService.get<boolean>('IS_DEVELOPERS_SETTINGS_ENABLED') ?? false
|
||||
);
|
||||
}
|
||||
|
||||
isTelemetryEnabled(): boolean {
|
||||
return this.configService.get<boolean>('TELEMETRY_ENABLED') ?? true;
|
||||
}
|
||||
|
||||
@ -36,6 +36,16 @@ export class EnvironmentVariables {
|
||||
@IsBoolean()
|
||||
SIGN_IN_PREFILLED?: boolean;
|
||||
|
||||
@CastToBoolean()
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
IS_DATA_MODEL_SETTINGS_ENABLED?: boolean;
|
||||
|
||||
@CastToBoolean()
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
IS_DEVELOPERS_SETTINGS_ENABLED?: boolean;
|
||||
|
||||
@CastToBoolean()
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
|
||||
Reference in New Issue
Block a user