Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1E63818D90 for ; Mon, 17 Aug 2015 06:28:14 +0000 (UTC) Received: (qmail 55024 invoked by uid 500); 17 Aug 2015 06:28:14 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 54993 invoked by uid 500); 17 Aug 2015 06:28:14 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 54983 invoked by uid 99); 17 Aug 2015 06:28:14 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Aug 2015 06:28:13 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 76BA2DE654 for ; Mon, 17 Aug 2015 06:28:13 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.104 X-Spam-Level: * X-Spam-Status: No, score=1.104 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.697, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id QF9jCN8Zm75q for ; Mon, 17 Aug 2015 06:28:06 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with SMTP id B514D20D31 for ; Mon, 17 Aug 2015 06:28:05 +0000 (UTC) Received: (qmail 54579 invoked by uid 99); 17 Aug 2015 06:28:04 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Aug 2015 06:28:04 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id CE35ADFDD7; Mon, 17 Aug 2015 06:28:04 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: anovikov@apache.org To: commits@ignite.incubator.apache.org Message-Id: <4f1b1ee93afd452997603a7b118674ef@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: incubator-ignite git commit: # IGNITE-843 Cleanup. Date: Mon, 17 Aug 2015 06:28:04 +0000 (UTC) Repository: incubator-ignite Updated Branches: refs/heads/ignite-843 1ecc6d61b -> 83e0457f1 # IGNITE-843 Cleanup. Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/83e0457f Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/83e0457f Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/83e0457f Branch: refs/heads/ignite-843 Commit: 83e0457f1c03425b80daba297e1da85bc80736bd Parents: 1ecc6d6 Author: Andrey Authored: Mon Aug 17 13:27:57 2015 +0700 Committer: Andrey Committed: Mon Aug 17 13:27:57 2015 +0700 ---------------------------------------------------------------------- .../src/main/js/routes/public.js | 51 -------------------- 1 file changed, 51 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/83e0457f/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 dcc5f71..ef00f56 100644 --- a/modules/control-center-web/src/main/js/routes/public.js +++ b/modules/control-center-web/src/main/js/routes/public.js @@ -186,57 +186,6 @@ router.get('/reset/:token', function (req, res) { }); }); -/** - * Reset password with given token. - */ -router.post('/reset_password', function(req, res) { - db.Account.findOne({ resetPasswordToken: req.body.token }, function(err, user) { - if (!user) - return res.status(500).send('Invalid token for password reset!'); - - if (err) - return res.status(500).send(err); - - user.setPassword(req.body.password, function (err, updatedUser) { - if (err) - return res.status(500).send(err.message); - - updatedUser.resetPasswordToken = undefined; - - updatedUser.save(function (err) { - if (err) - return res.status(500).send(err.message); - - var transporter = nodemailer.createTransport({ - service: 'gmail', - auth: { - user: _mailUser, - pass: _mailPass - } - }); - - var mailOptions = { - from: _mailUser, - to: user.email, - subject: 'Your password has been changed', - text: 'Hello,\n\n' + - 'This is a confirmation that the password for your account ' + user.email + ' has just been changed.\n\n' + - 'Now you can login: http://' + req.headers.host + '\n\n' + - '--------------\n' + - 'Apache Ignite Web Control Center\n' - }; - - transporter.sendMail(mailOptions, function(err){ - if (err) - return res.status(503).send('Password was changed, but failed to send confirmation e-mail!
' + err); - - return res.status(200).send(user.email); - }); - }); - }); - }); -}); - /* GET home page. */ router.get('/', function (req, res) { if (req.isAuthenticated())