Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion modules/base/tool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ func TestBasicAuthDecode(t *testing.T) {
func TestVerifyTimeLimitCode(t *testing.T) {
defer test.MockVariableValue(&setting.InstallLock, true)()
initGeneralSecret := func(secret string) {
setting.InstallLock = true
setting.CfgProvider, _ = setting.NewConfigProviderFromData(fmt.Sprintf(`
[security]
INSTALL_LOCK=true
[oauth2]
JWT_SECRET = %s
`, secret))
Expand Down
2 changes: 1 addition & 1 deletion modules/setting/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ func loadCommonSettingsFrom(cfg ConfigProvider) error {

mustCurrentRunUserMatch(cfg) // it depends on the SSH config, only non-builtin SSH server requires this check

loadOAuth2From(cfg)
loadSecurityFrom(cfg)
loadOAuth2From(cfg)
if err := loadAttachmentFrom(cfg); err != nil {
return err
}
Expand Down