feat(signup): Add disabled signup page (#15604)
Add a beta signup page and logic that will disable the signup page using a environmental flag
This commit is contained in:
committed by
Quincy Larson
parent
c0e876142a
commit
6e1a4b0d41
@ -283,10 +283,16 @@ module.exports = function(app) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isSignUpDisabled = !!process.env.DISABLE_SIGNUP;
|
||||||
function getEmailSignup(req, res) {
|
function getEmailSignup(req, res) {
|
||||||
if (req.user) {
|
if (req.user) {
|
||||||
return res.redirect('/');
|
return res.redirect('/');
|
||||||
}
|
}
|
||||||
|
if (isSignUpDisabled) {
|
||||||
|
return res.render('account/beta', {
|
||||||
|
title: 'New sign ups are disabled'
|
||||||
|
});
|
||||||
|
}
|
||||||
return res.render('account/email-signup', {
|
return res.render('account/email-signup', {
|
||||||
title: 'Sign up for freeCodeCamp using your Email Address'
|
title: 'Sign up for freeCodeCamp using your Email Address'
|
||||||
});
|
});
|
||||||
|
17
server/views/account/beta.jade
Normal file
17
server/views/account/beta.jade
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
extends ../layout
|
||||||
|
block content
|
||||||
|
.text-center
|
||||||
|
h2 Welcome to the freeCodeCamp beta.
|
||||||
|
h3 We have disabled new sign ups on beta.
|
||||||
|
.text-left.col-xs-12.col-sm-8.col-sm-offset-2.col-md-6.col-md-offset-3
|
||||||
|
p You can try our new beta challenges, but your progress <bold>will not</bold> be saved. 
|
||||||
|
a(href='/map') Click here to go to the beta challenges
|
||||||
|
| .
|
||||||
|
p Or you can return to our stable challenges, where your progress <bold>will</bold> be saved. 
|
||||||
|
a(href='https://www.freecodecamp.org') Click here to go to the stable challenges
|
||||||
|
| .
|
||||||
|
p If you want to learn more about this beta, read our 
|
||||||
|
a(href='https://forum.freecodecamp.org/t/frequently-asked-questions-about-the-freecodecamp-beta/134331') Frequently Asked Questions
|
||||||
|
| .
|
||||||
|
|
||||||
|
p Happy coding!
|
Reference in New Issue
Block a user