mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-28 17:46:16 +01:00
allowing moderators access to the account info page
This commit is contained in:
@@ -328,8 +328,15 @@ SocketUser.setModerationNote = function (socket, data, callback) {
|
||||
function (next) {
|
||||
user.isAdminOrGlobalMod(socket.uid, next);
|
||||
},
|
||||
function (isAdminOrGlobalMod, next) {
|
||||
if (!isAdminOrGlobalMod) {
|
||||
function (allowed, next) {
|
||||
if (allowed) {
|
||||
return next(null, allowed);
|
||||
}
|
||||
|
||||
user.isModeratorOfAnyCategory(socket.uid, next);
|
||||
},
|
||||
function (allowed, next) {
|
||||
if (!allowed) {
|
||||
return next(new Error('[[error:no-privileges]]'));
|
||||
}
|
||||
if (data.note) {
|
||||
|
||||
Reference in New Issue
Block a user