mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 12:05:57 +01:00
new 403 page
This commit is contained in:
@@ -126,13 +126,5 @@ var socket,
|
||||
|
||||
// Posting
|
||||
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.');
|
||||
});
|
||||
})
|
||||
}());
|
||||
|
||||
4
public/templates/403.tpl
Normal file
4
public/templates/403.tpl
Normal file
@@ -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>
|
||||
</ul>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -27,7 +27,7 @@ var fs = require('fs');
|
||||
loadTemplates([
|
||||
'header', 'footer', 'register', 'home',
|
||||
'login', 'reset', 'reset_code', 'account_settings',
|
||||
'logout',
|
||||
'logout', '403',
|
||||
'emails/reset', 'emails/reset_plaintext'
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ var express = require('express'),
|
||||
});
|
||||
|
||||
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() {
|
||||
|
||||
Reference in New Issue
Block a user