fixed issue where privileges were not correctly determined if you were granted moderator access to a category as a group (vs as a single user)

v1.18.x
Julian Lam 10 years ago
parent cd2ed20f3d
commit 830e1a7a3d

@ -441,7 +441,7 @@ var async = require('async'),
if (Array.isArray(uid)) {
async.parallel([
async.apply(groups.isMembers, uid, 'cid:' + cid + ':privileges:mods'),
async.apply(groups.isMembers, uid, 'cid:' + cid + ':privileges:groups:moderate')
async.apply(groups.isMembersOfGroupList, uid, 'cid:' + cid + ':privileges:groups:moderate')
], function(err, checks) {
var isModerator = checks[0].map(function(isMember, idx) {
return isMember || checks[1][idx];
@ -451,7 +451,7 @@ var async = require('async'),
} else {
async.parallel([
async.apply(groups.isMember, uid, 'cid:' + cid + ':privileges:mods'),
async.apply(groups.isMember, uid, 'cid:' + cid + ':privileges:groups:moderate')
async.apply(groups.isMemberOfGroupList, uid, 'cid:' + cid + ':privileges:groups:moderate')
], function(err, checks) {
var isModerator = checks[0] || checks[1];
filterIsModerator(null, isModerator);

Loading…
Cancel
Save