mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-02 22:00:34 +01:00
fix privs
This commit is contained in:
@@ -35,11 +35,11 @@ module.exports = function(privileges) {
|
||||
}, next);
|
||||
},
|
||||
users: function(next) {
|
||||
var privileges;
|
||||
var privs;
|
||||
async.waterfall([
|
||||
async.apply(plugins.fireHook, 'filter:privileges.list', privileges.userPrivilegeList),
|
||||
function(privs, next) {
|
||||
privileges = privs;
|
||||
function(_privs, next) {
|
||||
privs = _privs;
|
||||
groups.getMembersOfGroups(privs.map(function(privilege) {
|
||||
return 'cid:' + cid + ':privileges:' + privilege;
|
||||
}), next);
|
||||
@@ -72,11 +72,11 @@ module.exports = function(privileges) {
|
||||
], next);
|
||||
},
|
||||
groups: function(next) {
|
||||
var privileges;
|
||||
var privs;
|
||||
async.waterfall([
|
||||
async.apply(plugins.fireHook, 'filter:privileges.groups.list', privileges.groupPrivilegeList),
|
||||
function(privs, next) {
|
||||
privileges = privs;
|
||||
function(_privs, next) {
|
||||
privs = _privs;
|
||||
groups.getMembersOfGroups(privs.map(function(privilege) {
|
||||
return 'cid:' + cid + ':privileges:' + privilege;
|
||||
}), next);
|
||||
|
||||
Reference in New Issue
Block a user