From 11124b410b5389f8a0a9bffc4e7443d47b9795b9 Mon Sep 17 00:00:00 2001 From: Vitalii Date: Mon, 18 Mar 2024 14:45:53 +0200 Subject: [PATCH] satellite/console: feature flag for new setup app flow Added new feature flag for new setup application flow Issue: https://github.com/storj/storj/issues/6829 Change-Id: I8ca20620162782e92f579e6af1c615a92da39040 --- satellite/console/consoleweb/config.go | 1 + satellite/console/consoleweb/server.go | 2 ++ satellite/satellite-config.yaml.lock | 3 +++ web/satellite/src/types/config.gen.ts | 1 + 4 files changed, 7 insertions(+) diff --git a/satellite/console/consoleweb/config.go b/satellite/console/consoleweb/config.go index 65307190aaec..9fc2e0b565bd 100644 --- a/satellite/console/consoleweb/config.go +++ b/satellite/console/consoleweb/config.go @@ -65,6 +65,7 @@ type FrontendConfig struct { AnalyticsEnabled bool `json:"analyticsEnabled"` PlausibleScriptUrl string `json:"plausibleScriptUrl"` PlausibleDomain string `json:"plausibleDomain"` + NewAppSetupFlowEnabled bool `json:"newAppSetupFlowEnabled"` } // Satellites is a configuration value that contains a list of satellite names and addresses. diff --git a/satellite/console/consoleweb/server.go b/satellite/console/consoleweb/server.go index 9c98e0323530..615d4a1270f3 100644 --- a/satellite/console/consoleweb/server.go +++ b/satellite/console/consoleweb/server.go @@ -109,6 +109,7 @@ type Config struct { ApplicationsPageEnabled bool `help:"whether applications page should be shown" default:"false"` DaysBeforeTrialEndNotification int `help:"days left before trial end notification" default:"3"` BadPasswordsFile string `help:"path to a local file with bad passwords list, empty path == skip check" default:""` + NewAppSetupFlowEnabled bool `help:"whether new application setup flow should be used" default:"false"` OauthCodeExpiry time.Duration `help:"how long oauth authorization codes are issued for" default:"10m"` OauthAccessTokenExpiry time.Duration `help:"how long oauth access tokens are issued for" default:"24h"` @@ -847,6 +848,7 @@ func (server *Server) frontendConfigHandler(w http.ResponseWriter, r *http.Reque PlausibleDomain: server.AnalyticsConfig.Plausible.Domain, PlausibleScriptUrl: server.AnalyticsConfig.Plausible.ScriptUrl, DaysBeforeTrialEndNotification: server.config.DaysBeforeTrialEndNotification, + NewAppSetupFlowEnabled: server.config.NewAppSetupFlowEnabled, } err := json.NewEncoder(w).Encode(&cfg) diff --git a/satellite/satellite-config.yaml.lock b/satellite/satellite-config.yaml.lock index 8e6abffc6368..10796cb1f8ac 100644 --- a/satellite/satellite-config.yaml.lock +++ b/satellite/satellite-config.yaml.lock @@ -382,6 +382,9 @@ compensation.withheld-percents: 75,75,75,50,50,50,25,25,25,0,0,0,0,0,0 # indicates if storj native token payments system is enabled # console.native-token-payments-enabled: false +# whether new application setup flow should be used +# console.new-app-setup-flow-enabled: false + # how long oauth access tokens are issued for # console.oauth-access-token-expiry: 24h0m0s diff --git a/web/satellite/src/types/config.gen.ts b/web/satellite/src/types/config.gen.ts index e9013961a682..1da704dfedcf 100644 --- a/web/satellite/src/types/config.gen.ts +++ b/web/satellite/src/types/config.gen.ts @@ -61,6 +61,7 @@ export class FrontendConfig { analyticsEnabled: boolean; plausibleScriptUrl: string; plausibleDomain: string; + newAppSetupFlowEnabled: boolean; } export class MultiCaptchaConfig {