mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 15:05:46 +01:00
dont call isAdmin if not logged in
This commit is contained in:
@@ -36,6 +36,9 @@ var async = require('async'),
|
|||||||
};
|
};
|
||||||
|
|
||||||
SocketAdmin.before = function(socket, method, next) {
|
SocketAdmin.before = function(socket, method, next) {
|
||||||
|
if (!socket.uid) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
user.isAdministrator(socket.uid, function(err, isAdmin) {
|
user.isAdministrator(socket.uid, function(err, isAdmin) {
|
||||||
if (!err && isAdmin) {
|
if (!err && isAdmin) {
|
||||||
next();
|
next();
|
||||||
|
|||||||
Reference in New Issue
Block a user