Commit 2d9e96d4 authored by Rosanny Sihombing's avatar Rosanny Sihombing
Browse files

Merge branch 'MLAB-383' of...

Merge branch 'MLAB-383' of https://transfer.hft-stuttgart.de/gitlab/m4lab_tv1/user-account into MLAB-383
parents f60bc142 4c358f6d
...@@ -2020,6 +2020,11 @@ ...@@ -2020,6 +2020,11 @@
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
}, },
"denque": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/denque/-/denque-1.5.0.tgz",
"integrity": "sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ=="
},
"depd": { "depd": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
...@@ -2598,6 +2603,14 @@ ...@@ -2598,6 +2603,14 @@
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=" "integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0="
}, },
"generate-function": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz",
"integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==",
"requires": {
"is-property": "^1.0.2"
}
},
"gensync": { "gensync": {
"version": "1.0.0-beta.2", "version": "1.0.0-beta.2",
"resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
...@@ -3150,6 +3163,11 @@ ...@@ -3150,6 +3163,11 @@
"resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz",
"integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ=="
}, },
"is-property": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
"integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ="
},
"is-redirect": { "is-redirect": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz",
...@@ -4892,6 +4910,11 @@ ...@@ -4892,6 +4910,11 @@
"resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz",
"integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=" "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg="
}, },
"long": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
"integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
},
"lowercase-keys": { "lowercase-keys": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz",
...@@ -5154,6 +5177,57 @@ ...@@ -5154,6 +5177,57 @@
"sqlstring": "2.3.1" "sqlstring": "2.3.1"
} }
}, },
"mysql2": {
"version": "2.2.5",
"resolved": "https://registry.npmjs.org/mysql2/-/mysql2-2.2.5.tgz",
"integrity": "sha512-XRqPNxcZTpmFdXbJqb+/CtYVLCx14x1RTeNMD4954L331APu75IC74GDqnZMEt1kwaXy6TySo55rF2F3YJS78g==",
"requires": {
"denque": "^1.4.1",
"generate-function": "^2.3.1",
"iconv-lite": "^0.6.2",
"long": "^4.0.0",
"lru-cache": "^6.0.0",
"named-placeholders": "^1.1.2",
"seq-queue": "^0.0.5",
"sqlstring": "^2.3.2"
},
"dependencies": {
"iconv-lite": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.2.tgz",
"integrity": "sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ==",
"requires": {
"safer-buffer": ">= 2.1.2 < 3.0.0"
}
},
"lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"requires": {
"yallist": "^4.0.0"
}
},
"sqlstring": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.2.tgz",
"integrity": "sha512-vF4ZbYdKS8OnoJAWBmMxCQDkiEBkGQYU7UZPtL8flbDRSNkhaXvRJ279ZtI6M+zDaQovVU4tuRgzK5fVhvFAhg=="
},
"yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
}
}
},
"named-placeholders": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.2.tgz",
"integrity": "sha512-wiFWqxoLL3PGVReSZpjLVxyJ1bRqe+KKJVbr4hGs1KWfTZTQyezHFBbuKj9hsizHyGV2ne7EMjHdxEGAybD5SA==",
"requires": {
"lru-cache": "^4.1.3"
}
},
"nanomatch": { "nanomatch": {
"version": "1.2.13", "version": "1.2.13",
"resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
...@@ -5503,26 +5577,25 @@ ...@@ -5503,26 +5577,25 @@
} }
}, },
"passport-saml": { "passport-saml": {
"version": "1.4.2", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/passport-saml/-/passport-saml-1.4.2.tgz", "resolved": "https://registry.npmjs.org/passport-saml/-/passport-saml-2.1.0.tgz",
"integrity": "sha512-RJXtuiv4KWazi4zmZGVqN5pf3bV2aFbOygYzUCDEBDdeOD0yHFL4ymPOpLPXg35HvilFYTzB94JRWqwLdI2ecw==", "integrity": "sha512-czrh1ymuAOkDi7vIl1WEa2MLHQiqKKZEEOtaf0JUlMS0UaXbqCTj12wnYkZJdkKR/l1EkmmHcudvtCSsAoYpUQ==",
"requires": { "requires": {
"debug": "^3.1.0", "debug": "^4.3.1",
"passport-strategy": "*", "passport-strategy": "*",
"q": "^1.5.0", "xml-crypto": "^2.1.1",
"xml-crypto": "^2.0.0", "xml-encryption": "^1.2.3",
"xml-encryption": "1.2.1", "xml2js": "^0.4.23",
"xml2js": "0.4.x", "xmlbuilder": "^15.1.1",
"xmlbuilder": "^11.0.0", "xmldom": "0.5.x"
"xmldom": "0.1.x"
}, },
"dependencies": { "dependencies": {
"debug": { "debug": {
"version": "3.2.6", "version": "4.3.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
"requires": { "requires": {
"ms": "^2.1.1" "ms": "2.1.2"
} }
} }
} }
...@@ -5835,11 +5908,6 @@ ...@@ -5835,11 +5908,6 @@
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
}, },
"q": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc="
},
"qs": { "qs": {
"version": "6.7.0", "version": "6.7.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
...@@ -6381,6 +6449,11 @@ ...@@ -6381,6 +6449,11 @@
} }
} }
}, },
"seq-queue": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz",
"integrity": "sha1-1WgS4cAXpuTnw+Ojeh2m143TyT4="
},
"serve-static": { "serve-static": {
"version": "1.14.1", "version": "1.14.1",
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz",
...@@ -7337,30 +7410,30 @@ ...@@ -7337,30 +7410,30 @@
"integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=" "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ="
}, },
"xml-crypto": { "xml-crypto": {
"version": "2.0.0", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/xml-crypto/-/xml-crypto-2.0.0.tgz", "resolved": "https://registry.npmjs.org/xml-crypto/-/xml-crypto-2.1.1.tgz",
"integrity": "sha512-/a04qr7RpONRZHOxROZ6iIHItdsQQjN3sj8lJkYDDss8tAkEaAs0VrFjb3tlhmS5snQru5lTs9/5ISSMdPDHlg==", "integrity": "sha512-M+m4+HIJa83lu/CnspQjA7ap8gmanNDxxRjSisU8mPD4bqhxbo5N2bdpvG2WgVYOrPpOIOq55iY8Cz8Ai40IeQ==",
"requires": { "requires": {
"xmldom": "0.1.27", "xmldom": "0.5.0",
"xpath": "0.0.27" "xpath": "0.0.32"
},
"dependencies": {
"xmldom": {
"version": "0.1.27",
"resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz",
"integrity": "sha1-1QH5ezvbQDr4757MIFcxh6rawOk="
}
} }
}, },
"xml-encryption": { "xml-encryption": {
"version": "1.2.1", "version": "1.2.3",
"resolved": "https://registry.npmjs.org/xml-encryption/-/xml-encryption-1.2.1.tgz", "resolved": "https://registry.npmjs.org/xml-encryption/-/xml-encryption-1.2.3.tgz",
"integrity": "sha512-hn5w3l5p2+nGjlmM0CAhMChDzVGhW+M37jH35Z+GJIipXbn9PUlAIRZ6I5Wm7ynlqZjFrMAr83d/CIp9VZJMTA==", "integrity": "sha512-oVZIicsZM1VobJ5Hxxgh2ovglIY2ZuXFTeZHmJSV7hABvgkD20PSy4G+qwRToQCkagymS1zJU2XV4wjkoCS9mQ==",
"requires": { "requires": {
"escape-html": "^1.0.3", "escape-html": "^1.0.3",
"node-forge": "^0.10.0", "node-forge": "^0.10.0",
"xmldom": "~0.1.15", "xmldom": "~0.5.0",
"xpath": "0.0.27" "xpath": "0.0.27"
},
"dependencies": {
"xpath": {
"version": "0.0.27",
"resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.27.tgz",
"integrity": "sha512-fg03WRxtkCV6ohClePNAECYsmpKKTv5L8y/X3Dn1hQrec3POx2jHZ/0P2qQ6HvsrU1BmeqXcof3NGGueG6LxwQ=="
}
} }
}, },
"xml-name-validator": { "xml-name-validator": {
...@@ -7375,12 +7448,19 @@ ...@@ -7375,12 +7448,19 @@
"requires": { "requires": {
"sax": ">=0.6.0", "sax": ">=0.6.0",
"xmlbuilder": "~11.0.0" "xmlbuilder": "~11.0.0"
}
}, },
"dependencies": {
"xmlbuilder": { "xmlbuilder": {
"version": "11.0.1", "version": "11.0.1",
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz",
"integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA=="
}
}
},
"xmlbuilder": {
"version": "15.1.1",
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz",
"integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg=="
}, },
"xmlchars": { "xmlchars": {
"version": "2.2.0", "version": "2.2.0",
...@@ -7388,14 +7468,14 @@ ...@@ -7388,14 +7468,14 @@
"integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw=="
}, },
"xmldom": { "xmldom": {
"version": "0.1.31", "version": "0.5.0",
"resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.31.tgz", "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.5.0.tgz",
"integrity": "sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==" "integrity": "sha512-Foaj5FXVzgn7xFzsKeNIde9g6aFBxTPi37iwsno8QvApmtg7KYrr+OPyRHcJF7dud2a5nGRBXK3n0dL62Gf7PA=="
}, },
"xpath": { "xpath": {
"version": "0.0.27", "version": "0.0.32",
"resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.27.tgz", "resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.32.tgz",
"integrity": "sha512-fg03WRxtkCV6ohClePNAECYsmpKKTv5L8y/X3Dn1hQrec3POx2jHZ/0P2qQ6HvsrU1BmeqXcof3NGGueG6LxwQ==" "integrity": "sha512-rxMJhSIoiO8vXcWvSifKqhvV96GjiD5wYb8/QHdoRyQvraTpp4IEv944nhGausZZ3u7dhQXteZuZbaqfpB7uYw=="
}, },
"y18n": { "y18n": {
"version": "4.0.1", "version": "4.0.1",
......
...@@ -39,10 +39,11 @@ ...@@ -39,10 +39,11 @@
"jest": "^26.6.3", "jest": "^26.6.3",
"morgan": "^1.9.1", "morgan": "^1.9.1",
"mysql": "^2.17.1", "mysql": "^2.17.1",
"mysql2": "^2.2.5",
"nodemailer": "^6.3.1", "nodemailer": "^6.3.1",
"nodemon": "^2.0.1", "nodemon": "^2.0.1",
"passport": "0.3.2", "passport": "0.3.2",
"passport-saml": "^1.4.2", "passport-saml": "^2.1.0",
"pug": "^3.0.2" "pug": "^3.0.2"
}, },
"devDependencies": {}, "devDependencies": {},
......
...@@ -70,8 +70,8 @@ function head(){ ...@@ -70,8 +70,8 @@ function head(){
alertbutton.innerHTML = "&times;"; alertbutton.innerHTML = "&times;";
alertdiv.innerHTML="<strong>Disclaimer</strong> This website is under construction and in prototype-phase. It is not for public use." alertdiv.innerHTML="<strong>Disclaimer</strong> This website is under construction and in prototype-phase. It is not for public use."
prependChild(alertdiv, alertbutton); prependChild(alertdiv, alertbutton);
alertdiv.classList.add('alert','alert-danger', 'alert-dismissible', 'fade','show'); alertdiv.classList.add('alert','alert-danger', 'alert-dismissible', 'fade','show', 'text-center');
alertdiv.style = "text-align:center;"; //alertdiv.style = "text-align:center;";
navheader.appendChild(alertdiv); navheader.appendChild(alertdiv);
let navbar = document.createElement('nav'); let navbar = document.createElement('nav');
navbar.classList.add("navbar", "navbar-default"); navbar.classList.add("navbar", "navbar-default");
......
// ==== USER ACOOUNT API ====
var dbconn = require('./dbconn')
module.exports = function (app) {
//console.log(dbconn);
//var con = dbconn.connection
app.get('/api/v1/profile', function (req, res) {
if (req.isAuthenticated()) {
// read data based on email
dbconn.user.query('SELECT * FROM user WHERE email="'+req.user.email+'"', function (err, rows, fields) {
if (err) throw err
res.send(rows[0])
})
} else {
res.send('authentication required');
}
});
}
\ No newline at end of file
const mysql = require('mysql2')
var env = process.env.NODE_ENV || 'testing';
const config = require('../config/config')[env]
// ==== USER ACOOUNT DB CONNECTION ====
var userConnection = mysql.createConnection({
host: config.database.host,
user: config.database.user,
password: config.database.password,
port: config.database.port,
database: config.database.dbUser,
multipleStatements: true
})
userConnection.connect(function(err) {
if (err) throw err;
})
userConnection.query('USE '+config.database.dbUser)
// ALTERNATIVE approach: close db connection manually after every query
/*
var dbconn = function dbconn(query, values, next) {
var connection = mysql.createConnection({
host: config.database.host,
user: config.database.user,
password: config.database.password,
port: config.database.port,
database: config.database.db
})
connection.connect(function(err) {
if (err) throw err;
})
connection.query(query, values, function(err) {
connection.end(); // close the connection
if (err) {
throw err;
}
// Execute the callback
next.apply(this, arguments);
});
}
*/
// ==== PROJECT DB CONNECTION ====
var projectConnection = mysql.createConnection({
host: config.database.host_project,
user: config.database.user,
password: config.database.password,
port: config.database.port,
database: config.database.dbProject
})
projectConnection.connect(function(err) {
if (err) throw err;
})
projectConnection.query('USE '+config.database.dbProject)
var connection = {
user: userConnection,
project: projectConnection
}
module.exports = connection
\ No newline at end of file
const dbconn = require('./dbconn'); const dbconn_OBSOLETE = require('./dbconn') // DO NOT USE THIS FOR NEW FEATURE
const dbconn = require('./dbconn2')
var methods = { var methods = {
// ===================== user db ===================== // ===================== user db =====================
registerNewUser: function(data, callback) { registerNewUser: function(data, callback) {
dbconn.user.beginTransaction(function(err) { // START TRANSACTION dbconn_OBSOLETE.user.beginTransaction(function(err) { // START TRANSACTION
if (err) { if (err) {
throw err throw err
} }
// insert profile // insert profile
dbconn.user.query('INSERT INTO user SET ?', data.profile, function (err, results, fields) { dbconn_OBSOLETE.user.query('INSERT INTO user SET ?', data.profile, function (err, results, fields) {
if (err) { if (err) {
return dbconn.user.rollback(function() { return dbconn_OBSOLETE.user.rollback(function() {
throw err throw err
}); });
} }
...@@ -20,9 +21,9 @@ var methods = { ...@@ -20,9 +21,9 @@ var methods = {
user_id: newUserId, user_id: newUserId,
password: data.password password: data.password
} }
dbconn.user.query('INSERT INTO credential SET ?', credentialData, function (err, results, fields) { dbconn_OBSOLETE.user.query('INSERT INTO credential SET ?', credentialData, function (err, results, fields) {
if (err) { if (err) {
return dbconn.user.rollback(function() { return dbconn_OBSOLETE.user.rollback(function() {
throw err throw err
}); });
} }
...@@ -32,9 +33,9 @@ var methods = { ...@@ -32,9 +33,9 @@ var methods = {
role_id: 2, // USER role_id: 2, // USER
user_id: newUserId user_id: newUserId
} }
dbconn.user.query('INSERT INTO user_project_role SET ?', projectRoleData, function (err, results, fields) { dbconn_OBSOLETE.user.query('INSERT INTO user_project_role SET ?', projectRoleData, function (err, results, fields) {
if (err) { if (err) {
return dbconn.user.rollback(function() { return dbconn_OBSOLETE.user.rollback(function() {
throw err throw err
}); });
} }
...@@ -43,16 +44,16 @@ var methods = { ...@@ -43,16 +44,16 @@ var methods = {
user_id: newUserId, user_id: newUserId,
token: data.verificationToken token: data.verificationToken
} }
dbconn.user.query('INSERT INTO verification SET ?', verificationData, function (err, results, fields) { dbconn_OBSOLETE.user.query('INSERT INTO verification SET ?', verificationData, function (err, results, fields) {
if (err) { if (err) {
return dbconn.user.rollback(function() { return dbconn_OBSOLETE.user.rollback(function() {
throw err throw err
}); });
} }
// COMMIT // COMMIT
dbconn.user.commit(function(err) { dbconn_OBSOLETE.user.commit(function(err) {
if (err) { if (err) {
return dbconn.user.rollback(function() { return dbconn_OBSOLETE.user.rollback(function() {
throw err throw err
}) })
} }
...@@ -64,8 +65,8 @@ var methods = { ...@@ -64,8 +65,8 @@ var methods = {
callback(err) callback(err)
}) })
}, },
getUserByEmail: function(email, callback) { getUserByEmail_OBSOLETE: function(email, callback) {
dbconn.user.query('SELECT id, verificationStatus, salutation, title, firstname, lastname, industry, organisation, speciality, m4lab_idp FROM user WHERE email = "' +email+'"', function (err, rows, fields) { dbconn_OBSOLETE.user.query('SELECT id, verificationStatus, salutation, title, firstname, lastname, industry, organisation, speciality, m4lab_idp FROM user WHERE email = "' +email+'"', function (err, rows, fields) {
let user let user
if (err) { throw err } if (err) { throw err }
else { else {
...@@ -76,8 +77,17 @@ var methods = { ...@@ -76,8 +77,17 @@ var methods = {
callback(user, err) callback(user, err)
}); });
}, },
getUserByEmail: async function(email) {
try {
let rows = await dbconn.user.promise().query('SELECT id, verificationStatus, salutation, title, firstname, lastname, industry, organisation, speciality, m4lab_idp FROM user WHERE email = "' +email+'"')
return rows[0][0]
} catch (err) {
console.error(err)
return err
}
},
getUserById: function(userId, callback) { getUserById: function(userId, callback) {
dbconn.user.query('SELECT verificationStatus, email, salutation, title, firstname, lastname, industry, organisation, speciality FROM user WHERE id = ' +userId, function (err, rows, fields) { dbconn_OBSOLETE.user.query('SELECT verificationStatus, email, salutation, title, firstname, lastname, industry, organisation, speciality FROM user WHERE id = ' +userId, function (err, rows, fields) {
let user let user
if (err) { throw err } if (err) { throw err }
else { else {
...@@ -90,7 +100,7 @@ var methods = { ...@@ -90,7 +100,7 @@ var methods = {
}, },
checkUserEmail: function(email, callback) { checkUserEmail: function(email, callback) {
let user let user
dbconn.user.query('SELECT id, email FROM user WHERE email = "' +email+'"', function (err, rows) { dbconn_OBSOLETE.user.query('SELECT id, email FROM user WHERE email = "' +email+'"', function (err, rows) {
if (err) { throw err } if (err) { throw err }
else { else {
if ( rows.length > 0) { if ( rows.length > 0) {
...@@ -102,7 +112,7 @@ var methods = { ...@@ -102,7 +112,7 @@ var methods = {
}, },
getUserByToken: function(token, callback) { getUserByToken: function(token, callback) {
let user let user
dbconn.user.query('SELECT t1.user_id, t2.email FROM userdb.credential AS t1 INNER JOIN userdb.user AS t2 ON t1.user_id = t2.id AND t1.resetPasswordToken = "' dbconn_OBSOLETE.user.query('SELECT t1.user_id, t2.email FROM userdb.credential AS t1 INNER JOIN userdb.user AS t2 ON t1.user_id = t2.id AND t1.resetPasswordToken = "'
+token+'" and resetPasswordExpires > '+Date.now(), function (err, rows, fields) { +token+'" and resetPasswordExpires > '+Date.now(), function (err, rows, fields) {
if (err) { throw err } if (err) { throw err }
else { else {
...@@ -115,20 +125,20 @@ var methods = { ...@@ -115,20 +125,20 @@ var methods = {
) )
}, },
updateUserById: function(userData, callback) { updateUserById: function(userData, callback) {
dbconn.user.query('UPDATE user SET ? WHERE id = ' +userData.id, userData, function (err, rows, fields) { dbconn_OBSOLETE.user.query('UPDATE user SET ? WHERE id = ' +userData.id, userData, function (err, rows, fields) {
if (err) throw err if (err) throw err
callback(err) callback(err)
}) })
}, },
updateCredential: function(data, callback) { updateCredential: function(data, callback) {
dbconn.user.query('UPDATE credential SET ? WHERE user_id = ' +data.user_id, data, function (err, rows, fields) { dbconn_OBSOLETE.user.query('UPDATE credential SET ? WHERE user_id = ' +data.user_id, data, function (err, rows, fields) {
if (err) throw err if (err) throw err
callback(err) callback(err)
}) })
}, },
getUserIdByEmail: function(email, callback) { getUserIdByEmail: function(email, callback) {
let userId let userId
dbconn.user.query('SELECT id FROM user WHERE email = "' +email+'"', function (err, rows, fields) { dbconn_OBSOLETE.user.query('SELECT id FROM user WHERE email = "' +email+'"', function (err, rows, fields) {
if (err) { if (err) {
throw err throw err
} }
...@@ -141,20 +151,20 @@ var methods = { ...@@ -141,20 +151,20 @@ var methods = {
}); });
}, },
getUserProjectRole: function(userId, callback) { getUserProjectRole: function(userId, callback) {
dbconn.user.query('SELECT project_id, role_id FROM user_project_role WHERE user_id = "' +userId+'"', function (err, rows, fields) { dbconn_OBSOLETE.user.query('SELECT project_id, role_id FROM user_project_role WHERE user_id = "' +userId+'"', function (err, rows, fields) {
if (err) throw err if (err) throw err
callback(rows, err) callback(rows, err)
}); });
}, },
addUserProjectRole: function(data, callback) { addUserProjectRole: function(data, callback) {
dbconn.user.query('INSERT INTO user_project_role SET ?', data, function (err, results, fields){ dbconn_OBSOLETE.user.query('INSERT INTO user_project_role SET ?', data, function (err, results, fields){
if (err) throw err if (err) throw err
callback(err) callback(err)
}) })
}, },
getVerificationTokenByUserId: function(userId, callback) { getVerificationTokenByUserId: function(userId, callback) {
let token let token
dbconn.user.query('SELECT token FROM verification WHERE user_id = "' +userId+'"', function (err, rows, fields) { dbconn_OBSOLETE.user.query('SELECT token FROM verification WHERE user_id = "' +userId+'"', function (err, rows, fields) {
if (err) { if (err) {
throw err throw err
} }
...@@ -168,7 +178,7 @@ var methods = { ...@@ -168,7 +178,7 @@ var methods = {
}, },
getUserIdByVerificationToken: function(token, callback) { getUserIdByVerificationToken: function(token, callback) {
let userId let userId
dbconn.user.query('SELECT user_id FROM verification WHERE token = "' +token+'"', function (err, rows, fields) { dbconn_OBSOLETE.user.query('SELECT user_id FROM verification WHERE token = "' +token+'"', function (err, rows, fields) {
if (err) { if (err) {
throw err throw err
} }
...@@ -179,22 +189,22 @@ var methods = { ...@@ -179,22 +189,22 @@ var methods = {
}) })
}, },
verifyUserAccount: function(userData, callback) { verifyUserAccount: function(userData, callback) {
dbconn.user.beginTransaction(function(err) { // START TRANSACTION dbconn_OBSOLETE.user.beginTransaction(function(err) { // START TRANSACTION
if (err) { throw err } if (err) { throw err }
// update user status // update user status
dbconn.user.query('UPDATE user SET ? WHERE id =' +userData.id, userData, function (err, rows, fields) { dbconn_OBSOLETE.user.query('UPDATE user SET ? WHERE id =' +userData.id, userData, function (err, rows, fields) {
if (err) { if (err) {
return dbconn.user.rollback(function() { throw err }) return dbconn_OBSOLETE.user.rollback(function() { throw err })
} }
// delete verification token // delete verification token
dbconn.user.query('DELETE FROM verification WHERE user_id = '+userData.id, function (err, rows, fields) { dbconn_OBSOLETE.user.query('DELETE FROM verification WHERE user_id = '+userData.id, function (err, rows, fields) {
if (err) { if (err) {
return dbconn.user.rollback(function() { throw err }) return dbconn_OBSOLETE.user.rollback(function() { throw err })
} }
// COMMIT // COMMIT
dbconn.user.commit(function(err) { dbconn_OBSOLETE.user.commit(function(err) {
if (err) { if (err) {
return dbconn.user.rollback(function() { throw err }) return dbconn_OBSOLETE.user.rollback(function() { throw err })
} }
}) })
}) })
...@@ -203,9 +213,9 @@ var methods = { ...@@ -203,9 +213,9 @@ var methods = {
}) })
}, },
/* ===== GitLab ===== */ /* ===== GitLab ===== */
getGitlabId: function(userId, callback){ getGitlabId_OBSOLETE: function(userId, callback){
let gitlabUserId let gitlabUserId
dbconn.user.query('SELECT gu.gitlab_userId FROM user_gitlab gu, user u WHERE u.id = "' +userId+'" and gu.user_id = u.id', function (err, rows) { dbconn_OBSOLETE.user.query('SELECT gu.gitlab_userId FROM user_gitlab gu, user u WHERE u.id = "' +userId+'" and gu.user_id = u.id', function (err, rows) {
if (err) { if (err) {
throw err throw err
} }
...@@ -215,8 +225,18 @@ var methods = { ...@@ -215,8 +225,18 @@ var methods = {
callback(gitlabUserId, err) callback(gitlabUserId, err)
}) })
}, },
getGitlabId: async function(userId) {
try {
let rows = await dbconn.user.promise().query('SELECT gu.gitlab_userId FROM user_gitlab gu, user u WHERE u.id = "' +userId+'" and gu.user_id = u.id')
return rows[0][0].gitlab_userId
}
catch(err) {
console.error(err)
return err
}
},
addGitlabUser: function(data, callback){ addGitlabUser: function(data, callback){
dbconn.user.query('INSERT INTO user_gitlab SET ?', data, function (err) { dbconn_OBSOLETE.user.query('INSERT INTO user_gitlab SET ?', data, function (err) {
if (err) throw err if (err) throw err
callback(err) callback(err)
}) })
......
...@@ -21,8 +21,6 @@ const projectRepo = require('../classes/repo') ...@@ -21,8 +21,6 @@ const projectRepo = require('../classes/repo')
module.exports = function (app, config, passport, i18n) { module.exports = function (app, config, passport, i18n) {
var loggedInUser
// =========== PASSPORT ======= // =========== PASSPORT =======
passport.serializeUser(function (user, done) { passport.serializeUser(function (user, done) {
done(null, user); done(null, user);
...@@ -112,29 +110,28 @@ module.exports = function (app, config, passport, i18n) { ...@@ -112,29 +110,28 @@ module.exports = function (app, config, passport, i18n) {
var updatePasswordMailSubject = "Ihr Passwort für das Transferportal wurde gespeichert." var updatePasswordMailSubject = "Ihr Passwort für das Transferportal wurde gespeichert."
var updatePasswordMailContent = '<div>Lieber Nutzer,<br/><br/>Ihr Passwort wurde erfolgreich geändert.<br/><br/>' + mailSignature + '</div>'; var updatePasswordMailContent = '<div>Lieber Nutzer,<br/><br/>Ihr Passwort wurde erfolgreich geändert.<br/><br/>' + mailSignature + '</div>';
app.get('/', function (req, res) { async function getLoggedInUserData(email) {
let user = await methods.getUserByEmail(email)
let loggedInUser = new portalUser(
user.id, email, user.salutation, user.title, user.firstname, user.lastname, user.industry, user.organisation, user.speciality, user.m4lab_idp, null, user.verificationStatus
)
let userGitlabId = await methods.getGitlabId(loggedInUser.id)
loggedInUser.setGitlabUserId(userGitlabId)
return loggedInUser
}
app.get('/', async function (req, res) {
if ( !req.isAuthenticated() ) { if ( !req.isAuthenticated() ) {
res.redirect('/login') res.redirect('/login')
} else { } else {
methods.getUserByEmail(req.user.email, function(data, err){ let loggedInUser = await getLoggedInUserData(req.user.email)
if (!err) {
// Initialize user
if (!loggedInUser) {
loggedInUser = new portalUser(
data.id, req.user.email, data.salutation, data.title, data.firstname, data.lastname, data.industry, data.organisation, data.speciality, data.m4lab_idp, null, data.verificationStatus
)
methods.getGitlabId(data.id, function(gitlabUserId, err){
if(!err) {
loggedInUser.setGitlabUserId(gitlabUserId)
}
})
}
res.render(lang+'/account/home', { res.render(lang+'/account/home', {
user: loggedInUser user: loggedInUser
}); });
} }
})
}
}); });
app.get('/login', app.get('/login',
...@@ -166,10 +163,11 @@ module.exports = function (app, config, passport, i18n) { ...@@ -166,10 +163,11 @@ module.exports = function (app, config, passport, i18n) {
}); });
}); });
app.get('/profile', function (req, res) { app.get('/profile', async function (req, res) {
if(!req.isAuthenticated() && !loggedInUser) { if ( !req.isAuthenticated() ) {
res.redirect('/login') res.redirect('/login')
} else { } else {
let loggedInUser = await getLoggedInUserData(req.user.email)
if(loggedInUser.getVerificationStatus() != 1) { if(loggedInUser.getVerificationStatus() != 1) {
res.redirect('/account/') res.redirect('/account/')
} else { } else {
...@@ -181,9 +179,10 @@ module.exports = function (app, config, passport, i18n) { ...@@ -181,9 +179,10 @@ module.exports = function (app, config, passport, i18n) {
}) })
app.get('/services', async function(req, res){ app.get('/services', async function(req, res){
if(!req.isAuthenticated() && !loggedInUser) { if( !req.isAuthenticated() ) {
res.redirect('/login') res.redirect('/login')
} else { } else {
let loggedInUser = await getLoggedInUserData(req.user.email)
if(loggedInUser.getVerificationStatus() != 1) { // unverified users if(loggedInUser.getVerificationStatus() != 1) { // unverified users
res.redirect('/account/') res.redirect('/account/')
} else { } else {
...@@ -235,10 +234,11 @@ module.exports = function (app, config, passport, i18n) { ...@@ -235,10 +234,11 @@ module.exports = function (app, config, passport, i18n) {
} }
}) })
app.get('/security', function (req, res) { app.get('/security', async function (req, res) {
if (!req.isAuthenticated() && !loggedInUser) { if ( !req.isAuthenticated() ) {
res.redirect('/login') res.redirect('/login')
} else { } else {
let loggedInUser = await getLoggedInUserData(req.user.email)
if(loggedInUser.getVerificationStatus() == 1 && loggedInUser.getIdpStatus() == 1) { if(loggedInUser.getVerificationStatus() == 1 && loggedInUser.getIdpStatus() == 1) {
res.render(lang+'/account/security', { res.render(lang+'/account/security', {
user: loggedInUser user: loggedInUser
...@@ -249,7 +249,7 @@ module.exports = function (app, config, passport, i18n) { ...@@ -249,7 +249,7 @@ module.exports = function (app, config, passport, i18n) {
} }
}) })
app.post('/updateProfile', function (req, res) { app.post('/updateProfile', async function (req, res) {
var userData = { var userData = {
salutation: req.body.inputSalutation, salutation: req.body.inputSalutation,
title: req.body.inputTitle, title: req.body.inputTitle,
...@@ -261,9 +261,10 @@ module.exports = function (app, config, passport, i18n) { ...@@ -261,9 +261,10 @@ module.exports = function (app, config, passport, i18n) {
speciality: req.body.inputSpeciality, speciality: req.body.inputSpeciality,
} }
if (!req.isAuthenticated() && !loggedInUser) { if ( !req.isAuthenticated() ) {
res.redirect('/login') res.redirect('/login')
} else { } else {
let loggedInUser = await getLoggedInUserData(req.user.email)
if (userData.email) { if (userData.email) {
dbconn.user.query('UPDATE user SET ? WHERE email = "' +userData.email+'"', userData, function (err, rows, fields) { dbconn.user.query('UPDATE user SET ? WHERE email = "' +userData.email+'"', userData, function (err, rows, fields) {
if (err) { if (err) {
...@@ -280,10 +281,12 @@ module.exports = function (app, config, passport, i18n) { ...@@ -280,10 +281,12 @@ module.exports = function (app, config, passport, i18n) {
} }
}); });
app.post('/changePwd', function (req, res) { app.post('/changePwd', async function (req, res) {
if(!req.isAuthenticated() && !loggedInUser) { if( !req.isAuthenticated() ) {
res.redirect('/login') res.redirect('/login')
} else { } else {
let loggedInUser = await getLoggedInUserData(req.user.email)
var currPwd = req.body.inputCurrPwd var currPwd = req.body.inputCurrPwd
var newPwd = req.body.inputNewPwd var newPwd = req.body.inputNewPwd
var retypePwd = req.body.inputConfirm var retypePwd = req.body.inputConfirm
...@@ -461,9 +464,10 @@ module.exports = function (app, config, passport, i18n) { ...@@ -461,9 +464,10 @@ module.exports = function (app, config, passport, i18n) {
// ============= NEW GITLAB PAGES =========================== // ============= NEW GITLAB PAGES ===========================
app.get('/newInformation', async function(req, res){ app.get('/newInformation', async function(req, res){
if (!req.isAuthenticated() && !loggedInUser) { if ( !req.isAuthenticated() ) {
res.redirect('/login') res.redirect('/login')
} else { } else {
let loggedInUser = await getLoggedInUserData(req.user.email)
let gitlabUser = await gitlab.getUserByEmail(loggedInUser.getEmail()) let gitlabUser = await gitlab.getUserByEmail(loggedInUser.getEmail())
if (!gitlabUser) { // no user found if (!gitlabUser) { // no user found
res.redirect('/account/service') res.redirect('/account/service')
...@@ -475,10 +479,12 @@ module.exports = function (app, config, passport, i18n) { ...@@ -475,10 +479,12 @@ module.exports = function (app, config, passport, i18n) {
} }
} }
}) })
app.post('/newInformation', function(req, res) { app.post('/newInformation', async function(req, res) {
if(!req.isAuthenticated() && !loggedInUser) { if( !req.isAuthenticated() ) {
res.redirect('/login') res.redirect('/login')
} else { } else {
let loggedInUser = await getLoggedInUserData(req.user.email)
if (!req.body.name && !req.body.description) { if (!req.body.name && !req.body.description) {
res.flash('error', 'Bitte geben Sie die benötigten Daten ein') res.flash('error', 'Bitte geben Sie die benötigten Daten ein')
res.redirect('/account/newInformation') res.redirect('/account/newInformation')
...@@ -532,9 +538,11 @@ module.exports = function (app, config, passport, i18n) { ...@@ -532,9 +538,11 @@ module.exports = function (app, config, passport, i18n) {
}) })
app.get('/updateInformation', async function(req, res){ app.get('/updateInformation', async function(req, res){
if(!req.isAuthenticated() && !loggedInUser) { if( !req.isAuthenticated() ) {
res.redirect('/login') res.redirect('/login')
} else { } else {
let loggedInUser = await getLoggedInUserData(req.user.email)
if(!req.query.id) { if(!req.query.id) {
res.redirect('/account/services') res.redirect('/account/services')
} else { } else {
...@@ -558,10 +566,12 @@ module.exports = function (app, config, passport, i18n) { ...@@ -558,10 +566,12 @@ module.exports = function (app, config, passport, i18n) {
} }
}) })
app.post('/updateInformation', function(req, res){ app.post('/updateInformation', async function(req, res){
if(!req.isAuthenticated() && !loggedInUser) { if( !req.isAuthenticated() ) {
res.redirect('/login') res.redirect('/login')
} else { } else {
let loggedInUser = await getLoggedInUserData(req.user.email)
if (!req.body.name && !req.body.description) { if (!req.body.name && !req.body.description) {
res.flash('error', 'Bitte geben Sie die benötigten Daten ein') res.flash('error', 'Bitte geben Sie die benötigten Daten ein')
res.redirect('/account/updateInformation') res.redirect('/account/updateInformation')
...@@ -706,7 +716,6 @@ module.exports = function (app, config, passport, i18n) { ...@@ -706,7 +716,6 @@ module.exports = function (app, config, passport, i18n) {
// ============= USER VERIFICATION ================================ // ============= USER VERIFICATION ================================
app.get("/verifyAccount", function(req, res){ app.get("/verifyAccount", function(req, res){
console.log(req.query)
methods.getUserIdByVerificationToken(req.query.token, function(userId, err){ methods.getUserIdByVerificationToken(req.query.token, function(userId, err){
if (userId) { if (userId) {
let userData = { let userData = {
...@@ -744,9 +753,6 @@ module.exports = function (app, config, passport, i18n) { ...@@ -744,9 +753,6 @@ module.exports = function (app, config, passport, i18n) {
} }
}) })
if(!loggedInUser) {
loggedInUser.setVerificationStatus(userData.verificationStatus)
}
res.render(lang+'/account/verification', { res.render(lang+'/account/verification', {
status: true status: true
}); });
......
...@@ -14,9 +14,9 @@ html(lang="de") ...@@ -14,9 +14,9 @@ html(lang="de")
body body
div(class="container") div(class="container")
div(class="row") div(class="row")
div(class="col-md-12" style="margin-bottom: 40px;") div(class="col-md-12 margin_bottom_40")
img(class="mx-auto" src="/img/Kontakt.jpg" width="100%") img(class="mx-auto" src="/img/Kontakt.jpg" width="100%")
div(class="contact-clean" style="background-color: rgb(234,234,234);") div(class="contact-clean background_eaeaea")
if flash.success if flash.success
div.alert.alert-success.alert-dismissible #{flash.success} div.alert.alert-success.alert-dismissible #{flash.success}
a(class="close", href="#", data-dismiss="alert", aria-label="close") &times; a(class="close", href="#", data-dismiss="alert", aria-label="close") &times;
...@@ -32,18 +32,18 @@ html(lang="de") ...@@ -32,18 +32,18 @@ html(lang="de")
div(class="form-group") div(class="form-group")
textarea#message(class="form-control" name="message" placeholder="Nachricht" rows="14") textarea#message(class="form-control" name="message" placeholder="Nachricht" rows="14")
div(class="form-group") div(class="form-group")
input#submitBtn(class="btn btn-primary" type="submit" style="background-color: #8a348b;" value="SENDEN") input#submitBtn(class="btn contact_send_btn" type="submit" value="SENDEN")
div(class="contact-clean" style="background-color: rgb(234,234,234);padding: 80px;padding-top: 0px;") div(class="contact-clean contact_footer")
form(method="POST") form(method="POST")
p(style="margin-top: 25px;") <strong>Hochschule für Technik Stuttgart</strong><br/>Institut für Angewandte Forschung<br/>Innovative Hochschule - Projekt M4_LAB<br/>Schellingstr. 24<br/>70174 Stuttgart<br/>Deutschland<br/><br/><a href="mailto:support-transfer@hft-stuttgart.de">support-transfer@hft-stuttgart.de</a><br/><br/><a href="https://www.hft-stuttgart.de/">www.hft-stuttgart.de</a> / <a href="https://www.hft-stuttgart.de/M4LAB">www.hft-stuttgart.de/M4LAB</a><br/> p(class="m_top_25") <strong>Hochschule für Technik Stuttgart</strong><br/>Institut für Angewandte Forschung<br/>Innovative Hochschule - Projekt M4_LAB<br/>Schellingstr. 24<br/>70174 Stuttgart<br/>Deutschland<br/><br/><a href="mailto:support-transfer@hft-stuttgart.de">support-transfer@hft-stuttgart.de</a><br/><br/><a href="https://www.hft-stuttgart.de/">www.hft-stuttgart.de</a> / <a href="https://www.hft-stuttgart.de/M4LAB">www.hft-stuttgart.de/M4LAB</a><br/>
div(style="background-color: rgba(138,52,139,0.45);") div(class="background_8a348b")
div(class="container") div(class="container")
div(class="row") div(class="row")
div(class="col-md-4 col-lg-2") div(class="col-md-4 col-lg-2")
div(class="col-md-4 col-lg-8") div(class="col-md-4 col-lg-8")
div(style="background-color: #feffff;margin: 0px;padding: 60px;padding-top: 20px;padding-bottom: 20px;") div(class="contact_foot_message")
img(class="d-flex d-lg-flex justify-content-center justify-content-lg-center align-items-lg-start mx-auto" src="/img/Logo_TV1.png" width="100px" style="padding-bottom: 35px;") img(class="d-flex d-lg-flex justify-content-center justify-content-lg-center align-items-lg-start mx-auto p_bottom_35" src="/img/Logo_TV1.png" width="100px")
h2(class="text-center" style="color: #8a348b;") <strong>Transferportal</strong> h2(class="text-center color_8a348b") <strong>Transferportal</strong>
p(class="text-center") Das Transferportal entsteht in einem Teilprojekt der Innovativen <a href="https://www.hft-stuttgart.de">Hochschule für Technik Stuttgart</a>. Im <a href="https://www.hft-stuttgart.de/forschung/innovative-hochschule-m4-lab">Innovationslabor M4_LAB</a> wird das Transferportal als eine Webpräsenz entwickelt, welches Wissen, Lösungen und Dienste für HFT-Mitglieder, externe Partner und die allgemeine Öffentlichkeit bereitstellt.<br/><br/>Es ergänzt die Informationen der allgemeinen HFT-Webseite durch konkrete Ergebnisse aus Forschung und Entwicklung, verfügbar in verschiedenster Form wie beispielsweise Daten, Dokumentationen und Software-Code.<br/><br/>Zudem stellt es Kollaborationsmittel für Projektpartner und später auch Partizipationsmöglichkeiten für die breite Öffentlichkeit bereit. p(class="text-center") Das Transferportal entsteht in einem Teilprojekt der Innovativen <a href="https://www.hft-stuttgart.de">Hochschule für Technik Stuttgart</a>. Im <a href="https://www.hft-stuttgart.de/forschung/innovative-hochschule-m4-lab">Innovationslabor M4_LAB</a> wird das Transferportal als eine Webpräsenz entwickelt, welches Wissen, Lösungen und Dienste für HFT-Mitglieder, externe Partner und die allgemeine Öffentlichkeit bereitstellt.<br/><br/>Es ergänzt die Informationen der allgemeinen HFT-Webseite durch konkrete Ergebnisse aus Forschung und Entwicklung, verfügbar in verschiedenster Form wie beispielsweise Daten, Dokumentationen und Software-Code.<br/><br/>Zudem stellt es Kollaborationsmittel für Projektpartner und später auch Partizipationsmöglichkeiten für die breite Öffentlichkeit bereit.
div(class="col-md-4 col-lg-2") div(class="col-md-4 col-lg-2")
......
...@@ -16,7 +16,7 @@ html(lang="de") ...@@ -16,7 +16,7 @@ html(lang="de")
| Wir haben Ihnen eine E-Mail an Ihre verwendete Adresse gesendet. Diese enthält einen Link zur Bestätigung Ihres Accounts. | Wir haben Ihnen eine E-Mail an Ihre verwendete Adresse gesendet. Diese enthält einen Link zur Bestätigung Ihres Accounts.
| Wenn Sie die Mail nicht in ihrem Postfach vorfinden, prüfen Sie bitte auch Ihren Spam-Ordner. | Wenn Sie die Mail nicht in ihrem Postfach vorfinden, prüfen Sie bitte auch Ihren Spam-Ordner.
| <br >Falls Sie keine E-Mail von uns erhalten haben, können Sie <a href="javascript:void(0);" onclick="verify();">diese hier</a> erneut anfordern. | <br >Falls Sie keine E-Mail von uns erhalten haben, können Sie <a href="javascript:void(0);" onclick="verify();">diese hier</a> erneut anfordern.
div(class="spinner-border text-secondary", role="status", style="display: none") div(class="spinner-border text-secondary display_none", role="status")
else else
div(class="row min-vh-100 flex-column flex-md-row") div(class="row min-vh-100 flex-column flex-md-row")
aside(class="col-12 col-md-3 p-0 flex-shrink-1") aside(class="col-12 col-md-3 p-0 flex-shrink-1")
...@@ -25,7 +25,7 @@ html(lang="de") ...@@ -25,7 +25,7 @@ html(lang="de")
ul(class="flex-md-column flex-row navbar-nav w-100 justify-content-between") ul(class="flex-md-column flex-row navbar-nav w-100 justify-content-between")
li(class="nav-item") li(class="nav-item")
a(class="nav-link pl-0 text-nowrap" href="#") a(class="nav-link pl-0 text-nowrap" href="#")
span(class="font-weight-bold" style="color:black;") #{user.firstName} #{user.lastName} span(class="font-weight-bold color_black") #{user.firstname} #{user.lastname}
li(class="nav-item") li(class="nav-item")
a(class="nav-link pl-0" href="/account/profile") a(class="nav-link pl-0" href="/account/profile")
i(class="fa fa-user fa-fw") i(class="fa fa-user fa-fw")
...@@ -40,7 +40,7 @@ html(lang="de") ...@@ -40,7 +40,7 @@ html(lang="de")
i(class="fa fa-tasks fa-fw") i(class="fa fa-tasks fa-fw")
span(class="d-none d-md-inline") Projekte und Dienste span(class="d-none d-md-inline") Projekte und Dienste
li(class="nav-item") li(class="nav-item")
a(class="nav-link pl-0" href="/logout" style="color:red;") a(class="nav-link pl-0 color_red" href="/logout")
i(class="fa fa-sign-out-alt fa-fw") i(class="fa fa-sign-out-alt fa-fw")
span(class="d-none d-md-inline") Logout span(class="d-none d-md-inline") Logout
main(class="col bg-faded py-3 flex-grow-1") main(class="col bg-faded py-3 flex-grow-1")
......
...@@ -16,11 +16,11 @@ html(lang="de") ...@@ -16,11 +16,11 @@ html(lang="de")
ul(class="flex-md-column flex-row navbar-nav w-100 justify-content-between") ul(class="flex-md-column flex-row navbar-nav w-100 justify-content-between")
li(class="nav-item") li(class="nav-item")
a(class="nav-link pl-0 text-nowrap" href="/account/") a(class="nav-link pl-0 text-nowrap" href="/account/")
span(class="font-weight-bold" style="color:black;") #{user.firstName} #{user.lastName} span(class="font-weight-bold color_black") #{user.firstName} #{user.lastName}
li(class="nav-item") li(class="nav-item")
a(class="nav-link pl-0" href="/account/profile") a(class="nav-link pl-0" href="/account/profile")
i(class="fa fa-user fa-fw" style="color:black;") i(class="fa fa-user fa-fw color_black")
span(class="d-none d-md-inline" style="color:black;") Benutzerprofil span(class="d-none d-md-inline color_black") Benutzerprofil
if user.is_m4lab_idp if user.is_m4lab_idp
li(class="nav-item") li(class="nav-item")
a(class="nav-link pl-0" href="/account/security") a(class="nav-link pl-0" href="/account/security")
...@@ -31,14 +31,14 @@ html(lang="de") ...@@ -31,14 +31,14 @@ html(lang="de")
i(class="fa fa-tasks fa-fw") i(class="fa fa-tasks fa-fw")
span(class="d-none d-md-inline") Projekte und Dienste span(class="d-none d-md-inline") Projekte und Dienste
li(class="nav-item") li(class="nav-item")
a(class="nav-link pl-0" href="/logout" style="color:red;") a(class="nav-link pl-0 color_red" href="/logout")
i(class="fa fa-sign-out-alt fa-fw") i(class="fa fa-sign-out-alt fa-fw")
span(class="d-none d-md-inline") Logout span(class="d-none d-md-inline") Logout
main(class="col bg-faded py-3 flex-grow-1") main(class="col bg-faded py-3 flex-grow-1")
nav(aria-label="breadcrumb") nav(aria-label="breadcrumb")
ol(class="breadcrumb") ol(class="breadcrumb")
li(class="breadcrumb-item") li(class="breadcrumb-item")
a(href="/account") Konto a(href="/account/") Konto
li(class="breadcrumb-item active" aria-current="page") Benutzerprofil li(class="breadcrumb-item active" aria-current="page") Benutzerprofil
if flash.success if flash.success
......
...@@ -20,21 +20,21 @@ html(lang="de") ...@@ -20,21 +20,21 @@ html(lang="de")
ul(class="flex-md-column flex-row navbar-nav w-100 justify-content-between") ul(class="flex-md-column flex-row navbar-nav w-100 justify-content-between")
li(class="nav-item") li(class="nav-item")
a(class="nav-link pl-0 text-nowrap" href="/account/") a(class="nav-link pl-0 text-nowrap" href="/account/")
span(class="font-weight-bold" style="color:black;") #{user.firstName} #{user.lastName} span(class="font-weight-bold color_black") #{user.firstname} #{user.lastname}
li(class="nav-item") li(class="nav-item")
a(class="nav-link pl-0" href="/account/profile") a(class="nav-link pl-0" href="/account/profile")
i(class="fa fa-user fa-fw") i(class="fa fa-user fa-fw")
span(class="d-none d-md-inline") Benutzerprofil span(class="d-none d-md-inline") Benutzerprofil
li(class="nav-item") li(class="nav-item")
a(class="nav-link pl-0" href="/account/security") a(class="nav-link pl-0" href="/account/security")
i(class="fa fa-lock fa-fw" style="color:black;") i(class="fa fa-lock fa-fw color_black")
span(class="d-none d-md-inline" style="color:black;") Sicherheitseinstellungen span(class="d-none d-md-inline color_black") Sicherheitseinstellungen
li(class="nav-item") li(class="nav-item")
a(class="nav-link pl-0" href="/account/services") a(class="nav-link pl-0" href="/account/services")
i(class="fa fa-tasks fa-fw") i(class="fa fa-tasks fa-fw")
span(class="d-none d-md-inline") Projekte und Dienste span(class="d-none d-md-inline") Projekte und Dienste
li(class="nav-item") li(class="nav-item")
a(class="nav-link pl-0" href="/logout" style="color:red;") a(class="nav-link pl-0 color_red" href="/logout")
i(class="fa fa-sign-out-alt fa-fw") i(class="fa fa-sign-out-alt fa-fw")
span(class="d-none d-md-inline") Logout span(class="d-none d-md-inline") Logout
main(class="col bg-faded py-3 flex-grow-1") main(class="col bg-faded py-3 flex-grow-1")
......
...@@ -16,7 +16,7 @@ html(lang="de") ...@@ -16,7 +16,7 @@ html(lang="de")
ul(class="flex-md-column flex-row navbar-nav w-100 justify-content-between") ul(class="flex-md-column flex-row navbar-nav w-100 justify-content-between")
li(class="nav-item") li(class="nav-item")
a(class="nav-link pl-0 text-nowrap" href="/") a(class="nav-link pl-0 text-nowrap" href="/")
span(class="font-weight-bold" style="color:black;") #{user.firstName} #{user.lastName} span(class="font-weight-bold color_black") #{user.firstname} #{user.lastname}
li(class="nav-item") li(class="nav-item")
a(class="nav-link pl-0" href="/account/profile") a(class="nav-link pl-0" href="/account/profile")
i(class="fa fa-user fa-fw") i(class="fa fa-user fa-fw")
...@@ -28,10 +28,10 @@ html(lang="de") ...@@ -28,10 +28,10 @@ html(lang="de")
span(class="d-none d-md-inline") Sicherheitseinstellungen span(class="d-none d-md-inline") Sicherheitseinstellungen
li(class="nav-item") li(class="nav-item")
a(class="nav-link pl-0" href="/account/services") a(class="nav-link pl-0" href="/account/services")
i(class="fa fa-tasks fa-fw" style="color:black;") i(class="fa fa-tasks fa-fw color_black")
span(class="d-none d-md-inline" style="color:black;") Projekte und Dienste span(class="d-none d-md-inline color_black") Projekte und Dienste
li(class="nav-item") li(class="nav-item")
a(class="nav-link pl-0" href="/logout" style="color:red;") a(class="nav-link pl-0 color_red" href="/logout")
i(class="fa fa-sign-out-alt fa-fw") i(class="fa fa-sign-out-alt fa-fw")
span(class="d-none d-md-inline") Logout span(class="d-none d-md-inline") Logout
main(class="col bg-faded py-3 flex-grow-1") main(class="col bg-faded py-3 flex-grow-1")
......
Supports Markdown
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