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) {
|
||||
if (req.user) {
|
||||
return res.redirect('/');
|
||||
}
|
||||
if (isSignUpDisabled) {
|
||||
return res.render('account/beta', {
|
||||
title: 'New sign ups are disabled'
|
||||
});
|
||||
}
|
||||
return res.render('account/email-signup', {
|
||||
title: 'Sign up for freeCodeCamp using your Email Address'
|
||||
});
|
||||
|
Reference in New Issue
Block a user