Fix admin settings initialization (#31)

This commit is contained in:
Thomas Miceli 2023-05-12 12:06:55 +02:00 committed by GitHub
parent 5fe84164a5
commit 0cae152e03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

View file

@ -107,7 +107,6 @@ environment:
CONFIG: |
log-level: info
ssh.git-enabled: false
disable-signup: true
# ...
```

View file

@ -10,8 +10,9 @@ type AdminSetting struct {
}
const (
SettingDisableSignup = "disable-signup"
SettingRequireLogin = "require-login"
SettingDisableSignup = "disable-signup"
SettingRequireLogin = "require-login"
SettingDisableLoginForm = "disable-login-form"
)
func GetSetting(key string) (string, error) {

View file

@ -27,8 +27,9 @@ func Setup(dbpath string) error {
// Default admin setting values
return initAdminSettings(map[string]string{
SettingDisableSignup: "0",
SettingRequireLogin: "0",
SettingDisableSignup: "0",
SettingRequireLogin: "0",
SettingDisableLoginForm: "0",
})
}