Repository: incubator-ignite Updated Branches: refs/heads/ignite-843 2e8a3d1a3 -> 0a8b4720e
IGNITE-843 Refactored nodemailed user and pass to variables. Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/0a8b4720 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/0a8b4720 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/0a8b4720 Branch: refs/heads/ignite-843 Commit: 0a8b4720e55d6d5897f7f9b11c148e18dce24679 Parents: 2e8a3d1 Author: AKuznetsov <akuznet...@gridgain.com> Authored: Fri Aug 14 00:06:58 2015 +0700 Committer: AKuznetsov <akuznet...@gridgain.com> Committed: Fri Aug 14 00:06:58 2015 +0700 ---------------------------------------------------------------------- .../src/main/js/routes/public.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0a8b4720/modules/control-center-web/src/main/js/routes/public.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/routes/public.js b/modules/control-center-web/src/main/js/routes/public.js index f3dfb26..96f30a9 100644 --- a/modules/control-center-web/src/main/js/routes/public.js +++ b/modules/control-center-web/src/main/js/routes/public.js @@ -109,6 +109,9 @@ router.get('/logout', function (req, res) { res.redirect('/'); }); +var _mailUser = '!!! YOUR USERNAME !!!'; +var _mailPass = '!!! YOUR PASSWORD !!!'; + /** * Request for password reset and send e-mail to user with reset token. */ router.post('/request_password_reset', function(req, res) { @@ -130,13 +133,13 @@ router.post('/request_password_reset', function(req, res) { var transporter = nodemailer.createTransport({ service: 'gmail', auth: { - user: '!!! YOUR USERNAME !!!', - pass: '!!! YOUR PASSWORD !!!' + user: _mailUser, + pass: _mailPass } }); var mailOptions = { - from: '!!! YOUR USERNAME !!!', + from: _mailUser, to: user.email, subject: 'Password Reset', text: 'You are receiving this because you (or someone else) have requested the reset of the password for your account.\n\n' + @@ -149,7 +152,7 @@ router.post('/request_password_reset', function(req, res) { transporter.sendMail(mailOptions, function(err){ if (err) - return res.status(401).send('Failed to send e-mail with reset link!'); + return res.status(401).send('Failed to send e-mail with reset link!<br />' + err); return res.status(403).send('An e-mail has been sent with further instructions.'); }); @@ -201,13 +204,13 @@ router.post('/reset_password', function(req, res) { var transporter = nodemailer.createTransport({ service: 'gmail', auth: { - user: '!!! YOUR USERNAME !!!', - pass: '!!! YOUR PASSWORD !!!' + user: _mailUser, + pass: _mailPass } }); var mailOptions = { - from: '!!! YOUR USERNAME !!!', + from: _mailUser, to: user.email, subject: 'Your password has been changed', text: 'Hello,\n\n' +