Commit 354419d8 authored by Rosanny Sihombing's avatar Rosanny Sihombing
Browse files

MLAB 249: Prevent HFT accounts to create an account from the registration page.

parent c0b0a64e
......@@ -523,6 +523,16 @@ module.exports = function (app, config, passport, i18n) {
createdDate: curDate.toISOString().slice(0,10)
}
var userEmail = userData.email
var pos = userEmail.indexOf('@')
var emailLength = userEmail.length
var emailDomain = userEmail.slice(pos, emailLength);
if ( emailDomain.toLowerCase() == "@hft-stuttgart.de") {
req.flash('error', "Fehlgeschlagen: HFT-Account")
res.redirect('/account/registration');
}
else {
let token
async.waterfall([
function(done) {
......@@ -577,6 +587,7 @@ module.exports = function (app, config, passport, i18n) {
})
}
])
}
})
// ============= USER VERIFICATION ================================
......
......@@ -14,9 +14,12 @@ html(lang="de")
body
div(class="container-fluid")
div(class="row")
div(class="col-md-6 offset-md-2")
div(class="pt-4 pb-4 col-md-6 offset-md-2")
h3(class="mb-3 font-weight-bold") Neues Benutzerkonto anlegen
div(class="col-md-6 offset-md-3")
div(class="alert alert-info" role="alert")
| Auf dieser Seite können sich Benutzer, die keinen Account an der HFT haben, registrieren.<br/>
| Um sich mit ihrem HFT-Account anzumelden, klicken Sie <a class="font-weight-bold" href="https://transfer.hft-stuttgart.de/account/">hier</a>.
if successes
for success in successes
div.alert.alert-success.alert-dismissible #{ success }
......@@ -26,7 +29,7 @@ html(lang="de")
div.alert.alert-danger.alert-dismissible.fade.show #{ error }
a(class="close", href="#", data-dismiss="alert", aria-label="close") &times;
form(method="POST")
h5(class="mb-3 font-weight-bold") Anmeldedaten
h5(class="pt-2 mb-3 font-weight-bold") Anmeldedaten
div(class='form-row')
div(class='form-group col-md-6')
input#inputEmail(name="inputEmail", type="email", class="form-control", placeholder="E-Mail-Adresse*", maxlength="45" required)
......@@ -34,7 +37,7 @@ html(lang="de")
div(class="form-group col-md-6")
input#inputPassword(name="inputPassword", type="password", class="form-control", data-toggle="password", placeholder="Passwort*", maxlength="45" required)
span#passwordWarning(class='warning')
h5(class="mb-3 font-weight-bold") Benutzerprofil
h5(class="pt-2 mb-3 font-weight-bold") Benutzerprofil
div(class="form-row")
div(class='form-group col-md-2')
select#inputSalutation(name="inputSalutation", class="form-control")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment