satellite/{console,web}: add activation code config flag

This change adds a config flag for whether signup activation code
should be used.

Issue: #6428

Change-Id: I2b2b1e76f6013eab6438aefba848af0a4bd62544
This commit is contained in:
Wilfred Asomani 2023-11-14 13:47:18 +00:00
parent 26574fb2bd
commit 15b90661f4
5 changed files with 7 additions and 0 deletions

View File

@ -28,6 +28,7 @@ type Config struct {
BlockExplorerURL string `help:"url of the transaction block explorer" default:"https://etherscan.io/"`
BillingFeaturesEnabled bool `help:"indicates if billing features should be enabled" default:"true"`
StripePaymentElementEnabled bool `help:"indicates whether the stripe payment element should be used to collect card info" default:"true"`
SignupActivationCodeEnabled bool `help:"indicates whether the whether account activation is done using activation code" default:"false"`
UsageLimits UsageLimitsConfig
Captcha CaptchaConfig
Session SessionConfig

View File

@ -56,6 +56,7 @@ type FrontendConfig struct {
FreeTierInvitesEnabled bool `json:"freeTierInvitesEnabled"`
UserBalanceForUpgrade int64 `json:"userBalanceForUpgrade"`
LimitIncreaseRequestEnabled bool `json:"limitIncreaseRequestEnabled"`
SignupActivationCodeEnabled bool `json:"signupActivationCodeEnabled"`
}
// Satellites is a configuration value that contains a list of satellite names and addresses.

View File

@ -758,6 +758,7 @@ func (server *Server) frontendConfigHandler(w http.ResponseWriter, r *http.Reque
FreeTierInvitesEnabled: server.config.FreeTierInvitesEnabled,
UserBalanceForUpgrade: server.config.UserBalanceForUpgrade,
LimitIncreaseRequestEnabled: server.config.LimitIncreaseRequestEnabled,
SignupActivationCodeEnabled: server.config.SignupActivationCodeEnabled,
}
err := json.NewEncoder(w).Encode(&cfg)

View File

@ -412,6 +412,9 @@ compensation.withheld-percents: 75,75,75,50,50,50,25,25,25,0,0,0,0,0,0
# indicates whether remaining session time is shown for debugging
# console.session.inactivity-timer-viewer-enabled: false
# indicates whether the whether account activation is done using activation code
# console.signup-activation-code-enabled: false
# path to static resources
# console.static-dir: ""

View File

@ -53,6 +53,7 @@ export class FrontendConfig {
freeTierInvitesEnabled: boolean;
userBalanceForUpgrade: number;
limitIncreaseRequestEnabled: boolean;
signupActivationCodeEnabled: boolean;
}
export class MultiCaptchaConfig {