diff --git a/satellite/console/config.go b/satellite/console/config.go index eb9502f17359..c25f9ef34773 100644 --- a/satellite/console/config.go +++ b/satellite/console/config.go @@ -35,6 +35,7 @@ type Config struct { VarPartners []string `help:"list of partners whose users will not see billing UI." default:""` ObjectBrowserKeyNamePrefix string `help:"prefix for object browser API key names" default:".storj-web-file-browser-api-key-"` ObjectBrowserKeyLifetime time.Duration `help:"duration for which the object browser API key remains valid" default:"72h"` + MaxNameCharacters int `help:"defines the maximum number of characters allowed for names, e.g. user first/last names and company names" default:"100"` UsageLimits UsageLimitsConfig Captcha CaptchaConfig Session SessionConfig diff --git a/satellite/console/consoleweb/config.go b/satellite/console/consoleweb/config.go index f4fdde1b4b52..9445b153e168 100644 --- a/satellite/console/consoleweb/config.go +++ b/satellite/console/consoleweb/config.go @@ -66,6 +66,7 @@ type FrontendConfig struct { NewAppSetupFlowEnabled bool `json:"newAppSetupFlowEnabled"` ObjectBrowserKeyNamePrefix string `json:"objectBrowserKeyNamePrefix"` ObjectBrowserKeyLifetime time.Duration `json:"objectBrowserKeyLifetime"` + MaxNameCharacters int `json:"maxNameCharacters"` } // 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 5bee9d9d9141..bb3f1ac63c9d 100644 --- a/satellite/console/consoleweb/server.go +++ b/satellite/console/consoleweb/server.go @@ -870,6 +870,7 @@ func (server *Server) frontendConfigHandler(w http.ResponseWriter, r *http.Reque NewAppSetupFlowEnabled: server.config.NewAppSetupFlowEnabled, ObjectBrowserKeyNamePrefix: server.config.ObjectBrowserKeyNamePrefix, ObjectBrowserKeyLifetime: server.config.ObjectBrowserKeyLifetime, + MaxNameCharacters: server.config.MaxNameCharacters, } err := json.NewEncoder(w).Encode(&cfg) diff --git a/satellite/satellite-config.yaml.lock b/satellite/satellite-config.yaml.lock index 2ce970f6deb5..be6b09d819b6 100644 --- a/satellite/satellite-config.yaml.lock +++ b/satellite/satellite-config.yaml.lock @@ -385,6 +385,9 @@ compensation.withheld-percents: 75,75,75,50,50,50,25,25,25,0,0,0,0,0,0 # number of times user can try to login without penalty # console.login-attempts-without-penalty: 3 +# defines the maximum number of characters allowed for names, e.g. user first/last names and company names +# console.max-name-characters: 100 + # additional values for Content Security Policy media-src, space separated # console.media-src-suffix: '*.tardigradeshare.io *.storjshare.io *.storjsatelliteshare.io' diff --git a/web/satellite/src/types/config.gen.ts b/web/satellite/src/types/config.gen.ts index 66b237c7063c..9bc1c8d955f2 100644 --- a/web/satellite/src/types/config.gen.ts +++ b/web/satellite/src/types/config.gen.ts @@ -62,6 +62,7 @@ export class FrontendConfig { newAppSetupFlowEnabled: boolean; objectBrowserKeyNamePrefix: string; objectBrowserKeyLifetime: number; + maxNameCharacters: number; } export class MultiCaptchaConfig {