Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
m4lab_tv1
User Account
Commits
354419d8
Commit
354419d8
authored
Jun 19, 2020
by
Rosanny Sihombing
Browse files
MLAB 249: Prevent HFT accounts to create an account from the registration page.
parent
c0b0a64e
Changes
2
Show whitespace changes
Inline
Side-by-side
routes/routes-account.js
View file @
354419d8
...
...
@@ -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 ================================
...
...
views/DE/account/registration.pug
View file @
354419d8
...
...
@@ -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") ×
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")
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment