mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 03:42:27 +03:00
Added logout functionality, helper links and more cookie time
This commit is contained in:
parent
4becf72228
commit
554a16377b
2
app.js
2
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
|
||||
|
@ -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) {
|
||||
|
@ -8,4 +8,5 @@
|
||||
<input class="password" type="password" placeholder="Password" name="password">
|
||||
</div>
|
||||
<button class="button-save" type="submit">Log in</button>
|
||||
<a href="/ghost/register/">Register</a>
|
||||
</form>
|
@ -17,7 +17,7 @@
|
||||
<li class="usermenu-help"><a href="#">Help / Support</a></li>
|
||||
<li class="usermenu-shortcuts"><a href="#">Keyboard Shortcuts</a></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>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -8,4 +8,5 @@
|
||||
<input class="password" type="password" placeholder="Password" name="password">
|
||||
</div>
|
||||
<button class="button-save" type="submit">Register</button>
|
||||
<a href="/ghost/login/">Log in</a>
|
||||
</form>
|
Loading…
Reference in New Issue
Block a user