new 403 page

v1.18.x
Julian Lam 12 years ago
parent 7e637a93bb
commit 81364580ed

@ -126,13 +126,5 @@ var socket,
// Posting // Posting
jQuery('#post_window').slideToggle(0); jQuery('#post_window').slideToggle(0);
// Logout
logoutEl.addEventListener('click', function() {
socket.emit('api:user.logout');
});
socket.on('api:user.logout', function(data) {
if (data.status === 'ok') alert('Logged out.');
});
}) })
}()); }());

@ -0,0 +1,4 @@
<div class="alert alert-error">
<strong>Access Denied</strong>
<p>You seem to have stumbled upon a page that you do not have access to. Perhaps you should <a href="/login">try logging in?</a></p>
</div>

@ -117,7 +117,8 @@
<li><a href="/login">Login</a></li> <li><a href="/login">Login</a></li>
</ul> </ul>
<ul class="nav pull-right"> <ul class="nav pull-right">
<li><a href="/logout" id="logout">Log out</a></li> <li><a href="/account">Account</a></li>
<li><a href="/logout">Log out</a></li>
</ul> </ul>
</div> </div>
</div> </div>

@ -27,7 +27,7 @@ var fs = require('fs');
loadTemplates([ loadTemplates([
'header', 'footer', 'register', 'home', 'header', 'footer', 'register', 'home',
'login', 'reset', 'reset_code', 'account_settings', 'login', 'reset', 'reset_code', 'account_settings',
'logout', 'logout', '403',
'emails/reset', 'emails/reset_plaintext' 'emails/reset', 'emails/reset_plaintext'
]); ]);
} }

@ -93,7 +93,7 @@ var express = require('express'),
}); });
app.get('/403', function(req, res) { app.get('/403', function(req, res) {
res.send(403, 'You are not authorized to view this page'); res.send(templates['header'] + templates['403'] + templates['footer']);
}); });
module.exports.init = function() { module.exports.init = function() {

Loading…
Cancel
Save