Skip to content

Commit

Permalink
Fix admin settings initialization (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomiceli committed May 12, 2023
1 parent 5fe8416 commit 0cae152
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ environment:
CONFIG: |
log-level: info
ssh.git-enabled: false
disable-signup: true
# ...
```

Expand Down
5 changes: 3 additions & 2 deletions internal/models/admin_setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 3 additions & 2 deletions internal/models/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
})
}

Expand Down

0 comments on commit 0cae152

Please sign in to comment.