make upload permissions global

give upload image permission to registered users on install
add global privileges to app.user.privileges for client side use
This commit is contained in:
Barış Soner Uşaklı
2018-01-03 13:27:30 -05:00
parent bf1e2cfe46
commit ff6c6a54c1
17 changed files with 179 additions and 56 deletions

View File

@@ -221,3 +221,9 @@ helpers.getGroupPrivileges = function (cid, hookName, groupPrivilegeList, callba
},
], callback);
};
helpers.giveOrRescind = function (method, privileges, cid, groupName, callback) {
async.eachSeries(privileges, function (privilege, next) {
method('cid:' + cid + ':privileges:groups:' + privilege, groupName, next);
}, callback);
};