mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
Merge pull request #59 from javorszky/master
#48 (logout), register/login links, cookie time
This commit is contained in:
commit
8dfd687fa8
5 changed files with 7 additions and 2 deletions
2
app.js
2
app.js
|
@ -30,7 +30,7 @@
|
||||||
ghost.app().use(I18n.load(ghost));
|
ghost.app().use(I18n.load(ghost));
|
||||||
ghost.app().use(express.bodyParser());
|
ghost.app().use(express.bodyParser());
|
||||||
ghost.app().use(express.cookieParser('try-ghost'));
|
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(ghost.initTheme(ghost.app()));
|
||||||
ghost.app().use(flash());
|
ghost.app().use(flash());
|
||||||
// bind locals - options which appear in every view - perhaps this should be admin only
|
// bind locals - options which appear in every view - perhaps this should be admin only
|
||||||
|
|
|
@ -89,6 +89,9 @@
|
||||||
res.redirect('/ghost/login/');
|
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) {
|
'logout': function (req, res) {
|
||||||
|
|
|
@ -8,4 +8,5 @@
|
||||||
<input class="password" type="password" placeholder="Password" name="password">
|
<input class="password" type="password" placeholder="Password" name="password">
|
||||||
</div>
|
</div>
|
||||||
<button class="button-save" type="submit">Log in</button>
|
<button class="button-save" type="submit">Log in</button>
|
||||||
|
<a href="/ghost/register/">Register</a>
|
||||||
</form>
|
</form>
|
|
@ -17,7 +17,7 @@
|
||||||
<li class="usermenu-help"><a href="#">Help / Support</a></li>
|
<li class="usermenu-help"><a href="#">Help / Support</a></li>
|
||||||
<li class="usermenu-shortcuts"><a href="#">Keyboard Shortcuts</a></li>
|
<li class="usermenu-shortcuts"><a href="#">Keyboard Shortcuts</a></li>
|
||||||
<li class="divider"></li>
|
<li class="divider"></li>
|
||||||
<li class="usermenu-signout"><a href="#">Sign Out</a></li>
|
<li class="usermenu-signout"><a href="/logout/">Sign Out</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -8,4 +8,5 @@
|
||||||
<input class="password" type="password" placeholder="Password" name="password">
|
<input class="password" type="password" placeholder="Password" name="password">
|
||||||
</div>
|
</div>
|
||||||
<button class="button-save" type="submit">Register</button>
|
<button class="button-save" type="submit">Register</button>
|
||||||
|
<a href="/ghost/login/">Log in</a>
|
||||||
</form>
|
</form>
|
Loading…
Add table
Reference in a new issue