Skip to content

Allow ENABLE_OPENID_SIGNUP to depend on DISABLE_REGISTRATION #1369

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

Merged
merged 3 commits into from
Mar 29, 2017

Conversation

strk
Copy link
Member

@strk strk commented Mar 22, 2017

Omit the configuration variable (the default) to be dependent.
Fixes #1363

Omit the configuration variable (the default) to be dependent.
Fixes go-gitea#1363
@pgaskin
Copy link
Contributor

pgaskin commented Mar 22, 2017

LGTM

@tboerger tboerger added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Mar 22, 2017
@appleboy
Copy link
Member

LGTM

@tboerger tboerger added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 22, 2017
@strk
Copy link
Member Author

strk commented Mar 22, 2017

drone reporting broken ? build was successful...

@strk
Copy link
Member Author

strk commented Mar 22, 2017

(comment fixed this - ready to merge)

Copy link
Member

@bkcsoft bkcsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few thoughts

@@ -203,7 +203,8 @@ IMPORT_LOCAL_PATHS = false
; Whether to allow signin in via OpenID
ENABLE_OPENID_SIGNIN = true
; Whether to allow registering via OpenID
ENABLE_OPENID_SIGNUP = true
; Do not include to rely on DISABLE_REGISTRATION setting
;ENABLE_OPENID_SIGNUP = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we not default this to %(DISABLE_REGISTRATION) ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would only work if it's renamed to DISABLE_OPENID_SIGNUP, which kinda makes sense anyhow.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uhm, I didn't know about %(DISABLE_REGISTRATION) - would that use the value of DISABLE_REGISTRATION found under custom dir too ?

Renaming a variable would be a compatibility break, then we'd need to migrate config files ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Migrating variablenames could be done by removing the old default from conf/app.ini but load it from custom/conf/app.ini if it exists. then cfg = oldVar; if exists(newVar) { cfg = newVar } in LoadConfig. Maybe throw a deprication warning. So no migration needed. And would make the config defautls easier. Since ENABLE_OPENID_SIGNUP = ! DISABLE_REGISTRATION which I don't think you can do in ini format 😒

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are migration scripts allowed to modify stuff under custom/ ?
In general, is Gitea binary supposed to have write privilege in that dir ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bkcsoft I just realized it doesn't take write access to custom/ to do what you're asking, which is basically still support the old variable in custom if present. Sounds a bit complex though, is that still worth the advantage being the possibility to write DISABLE_OPENID_REGISTRATION = %DISABLE_REGISTRATION in custom/conf/app.ini ?

@lunny lunny added this to the 1.2.0 milestone Mar 27, 2017
@lunny lunny added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Mar 27, 2017
@strk
Copy link
Member Author

strk commented Mar 29, 2017

I think this is good enough to be merged. Has 2 LGTM and passed Drone. Fixes #1363 so please merge

@appleboy appleboy merged commit 129b0d6 into go-gitea:master Mar 29, 2017
@strk strk deleted the openid-registartion-default-to-global branch March 29, 2017 13:41
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disabling signup in the web installer doesn't disable signups through OpenID
6 participants