Commit 4243429b authored by Rosanny Sihombing's avatar Rosanny Sihombing
Browse files

update devel-branch

parent bc823d2a
pages-devel:
stage: deploy
script:
- npm install
- "pm2 delete --silent account || :"
- pm2 start ./app.js --name=account
- pm2 save
tags:
- testing
only:
- testing
\ No newline at end of file
module.exports = { module.exports = {
development: { development: {
app: { app: {
hostname: 'm4lab.hft-stuttgart.de/account',
name: 'User Account Management', name: 'User Account Management',
hostname: 'm4lab.hft-stuttgart.de/account',
port: process.env.PORT || 9989 port: process.env.PORT || 9989
}, },
passport: { passport: {
...@@ -9,17 +11,17 @@ module.exports = { ...@@ -9,17 +11,17 @@ module.exports = {
saml: { saml: {
path: process.env.SAML_PATH || '/saml/SSO', path: process.env.SAML_PATH || '/saml/SSO',
entryPoint: process.env.SAML_ENTRY_POINT || 'https://transfer.hft-stuttgart.de/idp/saml2/idp/SSOService.php', entryPoint: process.env.SAML_ENTRY_POINT || 'https://transfer.hft-stuttgart.de/idp/saml2/idp/SSOService.php',
issuer: 'sp-account.m4lab.hft-stuttgart.de', issuer: 'sp-account-testing.m4lab.hft-stuttgart.de',
logoutUrl: 'https://transfer.hft-stuttgart.de/idp/saml2/idp/SingleLogoutService.php' logoutUrl: 'https://transfer.hft-stuttgart.de/idp/saml2/idp/SingleLogoutService.php'
} }
}, },
database: { database: {
host: 'localhost', // DB host host: 'transfer.hft-stuttgart.de', // DB host
user: 'DBManager', // DB username user: 'DBManager', // DB username
password: 'Stuttgart2019', // DB password password: 'Stuttgart2019', // DB password
port: 3306, // MySQL port port: 3306, // MySQL port
dbUser: 'userdb', // User DB dbUser: 'userdb', // User DB
dbProject: 'projectdb' // Project DB dbProject: 'projectDB' // Project DB
}, },
mailer: { mailer: {
host: 'mail.hft-stuttgart.de', // hostname host: 'mail.hft-stuttgart.de', // hostname
...@@ -32,4 +34,3 @@ module.exports = { ...@@ -32,4 +34,3 @@ module.exports = {
} }
} }
} }
This diff is collapsed.
...@@ -23,20 +23,20 @@ ...@@ -23,20 +23,20 @@
"dependencies": { "dependencies": {
"async": "^3.1.0", "async": "^3.1.0",
"bcryptjs": "^2.4.3", "bcryptjs": "^2.4.3",
"body-parser": "1.15.1", "body-parser": "^1.19.0",
"cookie-parser": "1.4.3", "cookie-parser": "1.4.3",
"crypto": "^1.0.1", "crypto": "^1.0.1",
"errorhandler": "1.4.3", "errorhandler": "1.4.3",
"express": "4.13.4", "express": "^4.17.1",
"express-flash": "0.0.2", "express-flash": "0.0.2",
"express-session": "1.13.0", "express-session": "^1.17.0",
"fs": "0.0.1-security", "fs": "0.0.1-security",
"morgan": "1.7.0", "morgan": "^1.9.1",
"mysql": "^2.17.1", "mysql": "^2.17.1",
"nodemailer": "^6.3.1", "nodemailer": "^6.3.1",
"nodemon": "1.9.2", "nodemon": "^2.0.1",
"passport": "0.3.2", "passport": "0.3.2",
"passport-saml": "0.15.0", "passport-saml": "^1.2.0",
"pug": "^2.0.4" "pug": "^2.0.4"
}, },
"devDependencies": {}, "devDependencies": {},
......
...@@ -13,7 +13,7 @@ module.exports = function (app) { ...@@ -13,7 +13,7 @@ module.exports = function (app) {
res.send(rows[0]) res.send(rows[0])
}) })
} else { } else {
res.redirect('/'); res.redirect('/account/');
} }
}); });
......
...@@ -40,7 +40,7 @@ html(lang="en") ...@@ -40,7 +40,7 @@ html(lang="en")
for error, i in errors for error, i in errors
div.alert.alert-danger.alert-dismissible.fade.show #{ error } div.alert.alert-danger.alert-dismissible.fade.show #{ error }
a(class="close", href="#", data-dismiss="alert", aria-label="close") × a(class="close", href="#", data-dismiss="alert", aria-label="close") ×
form#forgotForm(class="form-signin", method="POST", action="/forgotPwd") form#forgotForm(class="form-signin", method="POST", action="/account/forgotPwd")
img(src="https://transfer.hft-stuttgart.de/images/demo/m4lab_logo.jpg", class="img-responsive center-block", width="185", height="192") img(src="https://transfer.hft-stuttgart.de/images/demo/m4lab_logo.jpg", class="img-responsive center-block", width="185", height="192")
div(class="form-row") div(class="form-row")
input#inputEmail(name="inputEmail", type="email", class="form-control", placeholder="Email" required) input#inputEmail(name="inputEmail", type="email", class="form-control", placeholder="Email" required)
...@@ -53,4 +53,4 @@ html(lang="en") ...@@ -53,4 +53,4 @@ html(lang="en")
// Bootstrap // Bootstrap
script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous") script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous")
// M4_LAB // M4_LAB
script(src="https://transfer.hft-stuttgart.de/js/headfoot.js") script(src="/js/headfoot.js")
\ No newline at end of file
...@@ -3,10 +3,10 @@ extends layout ...@@ -3,10 +3,10 @@ extends layout
block content block content
if user !== null if user !== null
h1 Hello, #{user.firstName} h1 Hello, #{user.firstName}
a(href="/profile") Profile a(href="/account/profile") Profile
br br
a(href="/logout") Logout a(href="/account/logout") Logout
else else
h1 Welcome h1 Welcome
br br
a(href="/login") Login a(href="/account/login") Login
...@@ -35,9 +35,9 @@ html(lang="en") ...@@ -35,9 +35,9 @@ html(lang="en")
span #{user.firstname} #{user.lastname} span #{user.firstname} #{user.lastname}
div(class="nav flex-column nav-pills", id="v-pills-tab", role="tablist", aria-orientation="vertical") div(class="nav flex-column nav-pills", id="v-pills-tab", role="tablist", aria-orientation="vertical")
a(class="nav-link" href="#" aria-selected="true") Profile a(class="nav-link" href="#" aria-selected="true") Profile
a(class="nav-link" href="/security" aria-selected="false") Security a(class="nav-link" href="/account/security" aria-selected="false") Security
a(class="nav-link" href="/services" aria-selected="false") Services a(class="nav-link" href="/account/services" aria-selected="false") Services
div(class="col-sm-8") div(class="col-sm-9")
if successes if successes
for success in successes for success in successes
div.alert.alert-success.alert-dismissible #{ success } div.alert.alert-success.alert-dismissible #{ success }
...@@ -87,5 +87,4 @@ html(lang="en") ...@@ -87,5 +87,4 @@ html(lang="en")
// Bootstrap // Bootstrap
script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous") script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous")
// M4_LAB // M4_LAB
//script(src="/js/account.js") script(src="/js/headfoot.js")
script(src="https://transfer.hft-stuttgart.de/js/headfoot.js")
\ No newline at end of file
...@@ -75,7 +75,7 @@ html(lang="en") ...@@ -75,7 +75,7 @@ html(lang="en")
input#inputSpeciality(name="inputSpeciality", type="text", class="form-control", placeholder="Fachgebiete") input#inputSpeciality(name="inputSpeciality", type="text", class="form-control", placeholder="Fachgebiete")
input#submitBtn(type="submit", class="btn btn-outline-dark btn-block", value="Submit" disabled) input#submitBtn(type="submit", class="btn btn-outline-dark btn-block", value="Submit" disabled)
br br
p(class="text-center") Already have an account? <a href="https://transfer.hft-stuttgart.de/login">Login</a>. p(class="text-center") Already have an account? <a href="/account/">Login</a>.
// jQuery // jQuery
...@@ -86,6 +86,6 @@ html(lang="en") ...@@ -86,6 +86,6 @@ html(lang="en")
// toggle password // toggle password
script(src='https://unpkg.com/bootstrap-show-password@1.2.1/dist/bootstrap-show-password.min.js') script(src='https://unpkg.com/bootstrap-show-password@1.2.1/dist/bootstrap-show-password.min.js')
// M4_LAB // M4_LAB
script(src="/js/generalFunction.js") script(src="/account/js/generalFunction.js")
script(src="/js/registration.js") script(src="/account/js/registration.js")
script(src="https://transfer.hft-stuttgart.de/js/headfoot.js") script(src="/js/headfoot.js")
\ No newline at end of file \ No newline at end of file
...@@ -37,9 +37,9 @@ html(lang="en") ...@@ -37,9 +37,9 @@ html(lang="en")
h5 h5
span #{user.firstName} #{user.lastName} span #{user.firstName} #{user.lastName}
div(class="nav flex-column nav-pills", id="v-pills-tab", role="tablist", aria-orientation="vertical") div(class="nav flex-column nav-pills", id="v-pills-tab", role="tablist", aria-orientation="vertical")
a(class="nav-link" href="/profile" aria-selected="true") Profile a(class="nav-link" href="/account/profile" aria-selected="true") Profile
a(class="nav-link" href="#" aria-selected="false") Security a(class="nav-link" href="#" aria-selected="false") Security
a(class="nav-link" href="/services" aria-selected="false") Services a(class="nav-link" href="/account/services" aria-selected="false") Services
div(class="col-sm-9") div(class="col-sm-9")
if successes if successes
for success in successes for success in successes
...@@ -49,24 +49,21 @@ html(lang="en") ...@@ -49,24 +49,21 @@ html(lang="en")
for error, i in errors for error, i in errors
div.alert.alert-danger.alert-dismissible.fade.show #{ error } div.alert.alert-danger.alert-dismissible.fade.show #{ error }
a(class="close", href="#", data-dismiss="alert", aria-label="close") &times; a(class="close", href="#", data-dismiss="alert", aria-label="close") &times;
form(class="needs-validation", method="post", action="/changePwd" novalidate) form(class="needs-validation", method="post", action="/account/changePwd" novalidate)
div(class="form-row") div(class="form-group row")
div(class='form-group col-md-6') label(for="currPwd") Current Password
label(for="currPwd") Current Password input(id="inputCurrPwd", name="inputCurrPwd", type="password", class="form-control" required)
input(id="inputCurrPwd", name="inputCurrPwd", type="password", class="form-control" required) div(class="invalid-feedback") Please fill in this field.
div(class="invalid-feedback") Please fill in this field. div(class="form-group row")
div(class="form-row") label(for="newPwd") New Password
div(class='form-group col-md-6') input#inputNewPwd(name="inputNewPwd", type="password", class="form-control" required)
label(for="newPwd") New Password span#recommendation
input#inputNewPwd(name="inputNewPwd", type="password", class="form-control" required) div(class="invalid-feedback") Please fill in this field.
span#recommendation(class='warning') div(class="form-group row")
div(class="invalid-feedback") Please fill in this field. label(for="confirm") Confirm New Password
div(class="form-row") input#inputConfirm(name="inputConfirm", type="password", class="form-control" required)
div(class='form-group col-md-6') span#message
label(for="confirm") Confirm New Password div(class="invalid-feedback") Please fill in this field.
input#inputConfirm(name="inputConfirm", type="password", class="form-control" required)
span#message(class='warning')
div(class="invalid-feedback") Please fill in this field.
input#updateBtn(type="submit", class="btn btn-primary", value="Update Password" disabled) input#updateBtn(type="submit", class="btn btn-primary", value="Update Password" disabled)
// jQuery // jQuery
...@@ -75,9 +72,9 @@ html(lang="en") ...@@ -75,9 +72,9 @@ html(lang="en")
// Bootstrap // Bootstrap
script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous") script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous")
// M4_LAB // M4_LAB
script(src="/js/generalFunction.js") script(src="/account/js/security.js")
script(src="/js/security.js") script(src="/account/js/generalFunction.js")
script(src="https://transfer.hft-stuttgart.de/js/headfoot.js") script(src="/js/headfoot.js")
script. script.
// check input fields // check input fields
'use strict'; 'use strict';
...@@ -94,4 +91,4 @@ html(lang="en") ...@@ -94,4 +91,4 @@ html(lang="en")
form.classList.add('was-validated'); form.classList.add('was-validated');
}, false); }, false);
}); });
}, false); }, false);
\ No newline at end of file
...@@ -34,8 +34,8 @@ html(lang="en") ...@@ -34,8 +34,8 @@ html(lang="en")
h5 h5
span #{user.firstName} #{user.lastName} span #{user.firstName} #{user.lastName}
div(class="nav flex-column nav-pills", id="v-pills-tab", role="tablist", aria-orientation="vertical") div(class="nav flex-column nav-pills", id="v-pills-tab", role="tablist", aria-orientation="vertical")
a(class="nav-link" href="/profile" aria-selected="true") Profile a(class="nav-link" href="/account/profile" aria-selected="true") Profile
a(class="nav-link" href="/security" aria-selected="false") Security a(class="nav-link" href="/account/security" aria-selected="false") Security
a(class="nav-link" href="#" aria-selected="false") Services a(class="nav-link" href="#" aria-selected="false") Services
div(class="col-sm-9") div(class="col-sm-9")
if successes if successes
...@@ -60,4 +60,4 @@ html(lang="en") ...@@ -60,4 +60,4 @@ html(lang="en")
// Bootstrap // Bootstrap
script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous") script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous")
// M4_LAB // M4_LAB
script(src="https://transfer.hft-stuttgart.de/js/headfoot.js") script(src="/js/headfoot.js")
\ No newline at end of file \ No newline at end of file
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