satellite/console: feature flag for billing features

Change-Id: I27623b2a9cd100ef38dda34bb48e332d616a478c
This commit is contained in:
Vitalii 2023-10-13 16:06:11 +03:00 committed by Storj Robot
parent e0cf6f1e8b
commit 4721d2bd4e
4 changed files with 7 additions and 0 deletions

View File

@ -50,6 +50,7 @@ type FrontendConfig struct {
GalleryViewEnabled bool `json:"galleryViewEnabled"`
NeededTransactionConfirmations int `json:"neededTransactionConfirmations"`
ObjectBrowserPaginationEnabled bool `json:"objectBrowserPaginationEnabled"`
BillingFeaturesEnabled bool `json:"billingFeaturesEnabled"`
}
// Satellites is a configuration value that contains a list of satellite names and addresses.

View File

@ -111,6 +111,7 @@ type Config struct {
UseVuetifyProject bool `help:"whether to use vuetify POC project" default:"false"`
VuetifyHost string `help:"the subdomain the vuetify POC project should be hosted on" default:""`
ObjectBrowserPaginationEnabled bool `help:"whether to use object browser pagination" default:"false"`
BillingFeaturesEnabled bool `help:"indicates if billing features should be enabled" default:"true"`
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"`
@ -748,6 +749,7 @@ func (server *Server) frontendConfigHandler(w http.ResponseWriter, r *http.Reque
GalleryViewEnabled: server.config.GalleryViewEnabled,
NeededTransactionConfirmations: server.neededTokenPaymentConfirmations,
ObjectBrowserPaginationEnabled: server.config.ObjectBrowserPaginationEnabled,
BillingFeaturesEnabled: server.config.BillingFeaturesEnabled,
}
err := json.NewEncoder(w).Encode(&cfg)

View File

@ -205,6 +205,9 @@ compensation.withheld-percents: 75,75,75,50,50,50,25,25,25,0,0,0,0,0,0
# url link for for beta satellite support
# console.beta-satellite-support-url: ""
# indicates if billing features should be enabled
# console.billing-features-enabled: true
# url of the transaction block explorer
# console.block-explorer-url: https://etherscan.io/

View File

@ -47,6 +47,7 @@ export class FrontendConfig {
galleryViewEnabled: boolean;
neededTransactionConfirmations: number;
objectBrowserPaginationEnabled: boolean;
billingFeaturesEnabled: boolean;
}
export class MultiCaptchaConfig {