Demo mode: automatically connect as demo user

This commit is contained in:
2026-02-24 19:02:38 +01:00
parent c50c6901b9
commit 18b5f0f0e1
7 changed files with 50 additions and 20 deletions

View File

@@ -19,6 +19,7 @@ type Config struct {
Limit int `toml:"limit" default:"100" comment:"A single API call will return at most this number of records."`
InventaireUrl string `toml:"inventaire-url" default:"https://inventaire.io" comment:"An inventaire.io instance URL."`
DisableRegistration bool `toml:"disable-registration" default:"false" comment:"Disable new account creation."`
DemoMode bool `toml:"demo-mode" default:"false" comment:"Activate demo mode: anyone connecting to the instance will be logged in as user 'demo'"`
}
func defaultConfig() Config {
@@ -31,6 +32,7 @@ func defaultConfig() Config {
Limit: 100,
InventaireUrl: "https://inventaire.io",
DisableRegistration: false,
DemoMode: false,
}
}