mirror of
https://github.com/thomiceli/opengist.git
synced 2025-01-03 16:22:40 +00:00
Fix admin settings initialization (#31)
This commit is contained in:
parent
5fe84164a5
commit
0cae152e03
3 changed files with 6 additions and 5 deletions
|
@ -107,7 +107,6 @@ environment:
|
||||||
CONFIG: |
|
CONFIG: |
|
||||||
log-level: info
|
log-level: info
|
||||||
ssh.git-enabled: false
|
ssh.git-enabled: false
|
||||||
disable-signup: true
|
|
||||||
# ...
|
# ...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,9 @@ type AdminSetting struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
SettingDisableSignup = "disable-signup"
|
SettingDisableSignup = "disable-signup"
|
||||||
SettingRequireLogin = "require-login"
|
SettingRequireLogin = "require-login"
|
||||||
|
SettingDisableLoginForm = "disable-login-form"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetSetting(key string) (string, error) {
|
func GetSetting(key string) (string, error) {
|
||||||
|
|
|
@ -27,8 +27,9 @@ func Setup(dbpath string) error {
|
||||||
|
|
||||||
// Default admin setting values
|
// Default admin setting values
|
||||||
return initAdminSettings(map[string]string{
|
return initAdminSettings(map[string]string{
|
||||||
SettingDisableSignup: "0",
|
SettingDisableSignup: "0",
|
||||||
SettingRequireLogin: "0",
|
SettingRequireLogin: "0",
|
||||||
|
SettingDisableLoginForm: "0",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue