From 554a16377b570019fd32869a2b1ace8ae0c4fe24 Mon Sep 17 00:00:00 2001 From: Gabor Javorszky Date: Fri, 24 May 2013 07:19:19 +0100 Subject: [PATCH] Added logout functionality, helper links and more cookie time --- app.js | 2 +- core/admin/controllers/index.js | 3 +++ core/admin/views/login.hbs | 1 + core/admin/views/partials/navbar.hbs | 2 +- core/admin/views/register.hbs | 1 + 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index e43a627f11..a8de8e1efb 100644 --- a/app.js +++ b/app.js @@ -30,7 +30,7 @@ ghost.app().use(I18n.load(ghost)); ghost.app().use(express.bodyParser()); ghost.app().use(express.cookieParser('try-ghost')); - ghost.app().use(express.cookieSession({ cookie: { maxAge: 60000 }})); + ghost.app().use(express.cookieSession({ cookie: { maxAge: 60000000 }})); ghost.app().use(ghost.initTheme(ghost.app())); ghost.app().use(flash()); // bind locals - options which appear in every view - perhaps this should be admin only diff --git a/core/admin/controllers/index.js b/core/admin/controllers/index.js index 9182951679..c9ab6cf5a0 100644 --- a/core/admin/controllers/index.js +++ b/core/admin/controllers/index.js @@ -89,6 +89,9 @@ res.redirect('/ghost/login/'); }); + } else { + req.flash('error', "The password is too short. Have at least 6 characters in there"); + res.redirect('/ghost/register/'); } }, 'logout': function (req, res) { diff --git a/core/admin/views/login.hbs b/core/admin/views/login.hbs index 2c53fac71c..3a10af1839 100644 --- a/core/admin/views/login.hbs +++ b/core/admin/views/login.hbs @@ -8,4 +8,5 @@ + Register \ No newline at end of file diff --git a/core/admin/views/partials/navbar.hbs b/core/admin/views/partials/navbar.hbs index cd73c2313b..c22b5043e6 100644 --- a/core/admin/views/partials/navbar.hbs +++ b/core/admin/views/partials/navbar.hbs @@ -17,7 +17,7 @@
  • Help / Support
  • Keyboard Shortcuts
  • -
  • Sign Out
  • +
  • Sign Out
  • diff --git a/core/admin/views/register.hbs b/core/admin/views/register.hbs index 80d8885370..c344cb8d20 100644 --- a/core/admin/views/register.hbs +++ b/core/admin/views/register.hbs @@ -8,4 +8,5 @@ + Log in \ No newline at end of file