summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2021-05-07 16:15:16 +0200
committerGitHub <noreply@github.com>2021-05-07 16:15:16 +0200
commit16034bb61332196a40c01be8bb3fd2d0b48198cf (patch)
tree2b6be46a7d25b9a44b4aea8b50d0fd30cd3b815c /modules
parent8f0539c235d47954d54dcf25c08297ddf7260970 (diff)
downloadgitea-16034bb61332196a40c01be8bb3fd2d0b48198cf.tar.gz
gitea-16034bb61332196a40c01be8bb3fd2d0b48198cf.zip
OAuth2 login: Set account link to "login" as default behavior (#15768)
Diffstat (limited to 'modules')
-rw-r--r--modules/setting/oauth2_client.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/setting/oauth2_client.go b/modules/setting/oauth2_client.go
index a336563c9a..6cfd99156f 100644
--- a/modules/setting/oauth2_client.go
+++ b/modules/setting/oauth2_client.go
@@ -71,10 +71,10 @@ func newOAuth2Client() {
OAuth2Client.Username = OAuth2UsernameNickname
}
OAuth2Client.UpdateAvatar = sec.Key("UPDATE_AVATAR").MustBool()
- OAuth2Client.AccountLinking = OAuth2AccountLinkingType(sec.Key("ACCOUNT_LINKING").MustString(string(OAuth2AccountLinkingDisabled)))
+ OAuth2Client.AccountLinking = OAuth2AccountLinkingType(sec.Key("ACCOUNT_LINKING").MustString(string(OAuth2AccountLinkingLogin)))
if !OAuth2Client.AccountLinking.isValid() {
- log.Warn("Account linking setting is not valid: '%s', will fallback to '%s'", OAuth2Client.AccountLinking, OAuth2AccountLinkingDisabled)
- OAuth2Client.AccountLinking = OAuth2AccountLinkingDisabled
+ log.Warn("Account linking setting is not valid: '%s', will fallback to '%s'", OAuth2Client.AccountLinking, OAuth2AccountLinkingLogin)
+ OAuth2Client.AccountLinking = OAuth2AccountLinkingLogin
}
}