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
Add allowemailregister
option
#317
Add allowemailregister
option
#317
Conversation
@SISheogorath You are so nice! |
Done. I have to verify everything works fine as we have no CI right now >.> |
I know, we should write some tests #22 |
Thank you @SISheogorath ! |
Ehhh >.> did you test that it works? My last test ended up in a setting |
You mean there might have so bugs? |
@@ -132,6 +132,7 @@ if (process.env.HMD_LDAP_PROVIDERNAME) { | |||
} | |||
var imgur = process.env.HMD_IMGUR_CLIENTID || config.imgur || false; | |||
var email = process.env.HMD_EMAIL ? (process.env.HMD_EMAIL === 'true') : !!config.email; | |||
var allowemailregister = process.env.HMD_ALLOW_EMAIL_REGISTER ? (process.env.HMD_HMD_ALLOW_EMAIL_REGISTER === 'true') : !!config.allowemailregister; |
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.
Well, here is the bug.
This should be:
var allowemailregister = process.env.HMD_ALLOW_EMAIL_REGISTER ? (process.env.HMD_ALLOW_EMAIL_REGISTER === 'true') : ((typeof config.allowemailregister === 'boolean') ? config.allowemailregister : true);
Or it will default to be false.
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.
And there is a typo HMD_HMD_ALLOW_EMAIL_REGISTER
.
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.
Both of above have been fixed in 6be8752
I just made a patch, please help to test @SISheogorath. |
Cool. I'll test it in a few seconds ;) |
@jackycute Works great! Thanks! (Tested with the lite image as the stable wasn't ready) |
how to use it in dockerfile version? I use docker-compose to build my Codimd. In Readme.md , there is not reference issues to talk about it. |
…gister Add `allowemailregister` option
A small contribution to solve some "paper cut issues" ;)
#297