Commit bd2881c2 authored by Wolfgang Knopki's avatar Wolfgang Knopki
Browse files

reverted to dedicated account url

1 merge request!2Mlab 56
Pipeline #523 passed with stage
in 7 seconds
Showing with 24 additions and 24 deletions
+24 -24
......@@ -62,7 +62,7 @@ module.exports = function (app, config, passport, i18n) {
failureFlash: true
}),
function (req, res) {
res.redirect('/');
res.redirect('/account/');
}
);
......@@ -125,7 +125,7 @@ module.exports = function (app, config, passport, i18n) {
}
})
} else {
res.redirect('/login'); // localhost
res.redirect('/account/login'); // localhost
}
});
......@@ -136,14 +136,14 @@ module.exports = function (app, config, passport, i18n) {
app.get('/login',
passport.authenticate(config.passport.strategy,
{
successRedirect: '/account/',
successRedirect: '/',
failureRedirect: '/login'
})
);
app.get('/logout', function (req, res) {
if (req.user == null) {
return res.redirect('/');
return res.redirect('/account/');
}
req.user.nameID = req.user.id;
......@@ -174,7 +174,7 @@ module.exports = function (app, config, passport, i18n) {
}
})
} else {
res.redirect('/login');
res.redirect('/account/login');
}
});
......@@ -238,7 +238,7 @@ module.exports = function (app, config, passport, i18n) {
}
])
} else {
res.redirect('/login');
res.redirect('/account/login');
}
});
......@@ -248,7 +248,7 @@ module.exports = function (app, config, passport, i18n) {
user: req.user // useful for view engine, useless for HTML
});
} else {
res.redirect('/login');
res.redirect('/account/login');
}
});
......@@ -278,7 +278,7 @@ module.exports = function (app, config, passport, i18n) {
})
}
} else {
res.redirect('/login');
res.redirect('/account/login');
}
});
......@@ -293,7 +293,7 @@ module.exports = function (app, config, passport, i18n) {
// Load hashed passwd from DB
dbconn.user.query('SELECT password FROM credential WHERE user_id='+userId, function (err, rows, fields) {
if (err) {
res.redirect('/500')
res.redirect('/account/500')
throw err
}
var userPwd = rows[0].password
......@@ -301,14 +301,14 @@ module.exports = function (app, config, passport, i18n) {
// check if the password is correct
bcrypt.compare(currPwd, userPwd, function(err, isMatch) {
if (err) {
res.redirect('/500')
res.redirect('/account/500')
throw err
}
else if (!isMatch) {
//req.flash('error', "Sorry, your password was incorrect. Please double-check your password.")
req.flash('error', "Das Passwort ist leider falsch. Bitte überprüfen Sie Ihre Eingabe.")
//res.redirect('/security')
res.redirect('/security')
//res.redirect('/account/security')
res.redirect('/account/security')
}
else {
if ( newPwd != retypePwd ) {
......@@ -342,7 +342,7 @@ module.exports = function (app, config, passport, i18n) {
}
});
}
res.redirect('/security')
res.redirect('/account/security')
})
});
});
......@@ -354,7 +354,7 @@ module.exports = function (app, config, passport, i18n) {
})
}
else {
res.redirect('/login');
res.redirect('/account/login');
}
});
......@@ -429,8 +429,8 @@ module.exports = function (app, config, passport, i18n) {
//req.flash('success', 'If your email is registered, an e-mail has been sent to ' + emailAddress + ' with further instructions.');
req.flash('success', 'Wenn Ihre E-Mail-Adresse registriert ist, wurde eine E-Mail mit dem weiteren Vorgehen an ' + emailAddress + ' versendet.');
}
//res.redirect('/forgotPwd'); // deployment
res.redirect('/forgotPwd'); // localhost
//res.redirect('/account/forgotPwd'); // deployment
res.redirect('/account/forgotPwd'); // localhost
});
});
......@@ -439,8 +439,8 @@ module.exports = function (app, config, passport, i18n) {
if (!user) {
//req.flash('error', 'Password reset token is invalid or has expired.');
req.flash('error', 'Der Schlüssel zum zurücksetzen des Passworts ist ungültig oder abgelaufen.');
//res.redirect('/forgotPwd'); // deployment
res.redirect('/forgotPwd'); // localhost
//res.redirect('/account/forgotPwd'); // deployment
res.redirect('/account/forgotPwd'); // localhost
}
else {
res.render(lang+'/account/reset');
......@@ -479,7 +479,7 @@ module.exports = function (app, config, passport, i18n) {
}
});
// redirect to login page
res.redirect('/login')
res.redirect('/account/login')
}
})
});
......@@ -487,7 +487,7 @@ module.exports = function (app, config, passport, i18n) {
}
else {
req.flash('error', "User not found.")
res.redirect('/login')
res.redirect('/account/login')
}
});
......@@ -533,7 +533,7 @@ module.exports = function (app, config, passport, i18n) {
//req.flash('success', 'Your account has been created. Please log in.')
req.flash('success', 'Ihr Benutzerkonto wurde angelegt. Bitte melden Sie sich an.')
}
res.redirect('/registration');
res.redirect('/account/registration');
})
});
});
......@@ -640,7 +640,7 @@ module.exports = function (app, config, passport, i18n) {
res.render(lang+'/project/addProjectOverview')
}
else {
res.redirect('/login')
res.redirect('/account/login')
}
})
......@@ -681,11 +681,11 @@ module.exports = function (app, config, passport, i18n) {
if (err) {
//req.flash('error', "Failed")
req.flash('error', "Fehlgeschlagen")
res.redirect('/addProjectOverview');
res.redirect('/account/addProjectOverview');
}
else {
req.flash('success', 'Your project has been created.')
res.redirect('/project');
res.redirect('/account/project');
}
})
}
......
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