Skip to content

Commit

Permalink
satellite/{console,web}: add activation code config flag
Browse files Browse the repository at this point in the history
This change adds a config flag for whether signup activation code
should be used.

Issue: #6428

Change-Id: I2b2b1e76f6013eab6438aefba848af0a4bd62544
  • Loading branch information
wilfred-asomanii committed Nov 22, 2023
1 parent 26574fb commit 15b9066
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions satellite/console/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions satellite/console/consoleweb/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions satellite/console/consoleweb/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions scripts/testdata/satellite-config.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""

Expand Down
1 change: 1 addition & 0 deletions web/satellite/src/types/config.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export class FrontendConfig {
freeTierInvitesEnabled: boolean;
userBalanceForUpgrade: number;
limitIncreaseRequestEnabled: boolean;
signupActivationCodeEnabled: boolean;
}

export class MultiCaptchaConfig {
Expand Down

0 comments on commit 15b9066

Please sign in to comment.