-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set OpenID support on by default when installing new instance #3010
Conversation
modules/setting/setting.go
Outdated
@@ -1165,7 +1165,7 @@ func newService() { | |||
Service.NoReplyAddress = sec.Key("NO_REPLY_ADDRESS").MustString("noreply.example.org") | |||
|
|||
sec = Cfg.Section("openid") | |||
Service.EnableOpenIDSignIn = sec.Key("ENABLE_OPENID_SIGNIN").MustBool(false) | |||
Service.EnableOpenIDSignIn = sec.Key("ENABLE_OPENID_SIGNIN").MustBool(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I think this should keep false. For a default installation, the minimal feature rule will keep system safer.
modules/setting/setting.go
Outdated
if customConfExists { | ||
defOpenIDSignIn = true; | ||
} | ||
Service.EnableOpenIDSignIn = sec.Key("ENABLE_OPENID_SIGNIN").MustBool(defOpenIDSignIn) | ||
Service.EnableOpenIDSignUp = sec.Key("ENABLE_OPENID_SIGNUP").MustBool(!Service.DisableRegistration && Service.EnableOpenIDSignIn) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should simply be
Service.EnableOpenIDSignIn = sec.Key("ENABLE_OPENID_SIGNIN").MustBool(!InstallLock)
because InstallLock
state seems to indicate whether this is fresh install or not, while Gitea creates app.ini
itself during install process.
f7c8db4
to
7686c02
Compare
Partially fixes go-gitea#2984
db47bb8
to
68fe411
Compare
LGTM |
LGTM |
Codecov Report
@@ Coverage Diff @@
## master #3010 +/- ##
=======================================
Coverage 32.98% 32.98%
=======================================
Files 270 270
Lines 39534 39534
=======================================
Hits 13042 13042
Misses 24637 24637
Partials 1855 1855
Continue to review full report at Codecov.
|
@strk please send backport to 1.3 |
Partially fixes #2984