From 09ce48ad33b0d9bf07412021b33f218802c54015 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 8 Jun 2016 11:52:55 +0300 Subject: [PATCH] fix privs --- src/privileges/categories.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/privileges/categories.js b/src/privileges/categories.js index 8b556f68f8..382d89e4e4 100644 --- a/src/privileges/categories.js +++ b/src/privileges/categories.js @@ -35,12 +35,12 @@ module.exports = function(privileges) { }, next); }, users: function(next) { - var privs; + var userPrivileges; async.waterfall([ async.apply(plugins.fireHook, 'filter:privileges.list', privileges.userPrivilegeList), function(_privs, next) { - privs = _privs; - groups.getMembersOfGroups(privs.map(function(privilege) { + userPrivileges = _privs; + groups.getMembersOfGroups(userPrivileges.map(function(privilege) { return 'cid:' + cid + ':privileges:' + privilege; }), next); }, @@ -61,8 +61,8 @@ module.exports = function(privileges) { memberData.forEach(function(member) { member.privileges = {}; - for(var x=0,numPrivs=privileges.length;x