|
|
|
@ -3,7 +3,7 @@
|
|
|
|
|
var async = require('async');
|
|
|
|
|
|
|
|
|
|
var db = require('../database');
|
|
|
|
|
var privileges = require('../privileges');
|
|
|
|
|
|
|
|
|
|
var groups = require('../groups');
|
|
|
|
|
var plugins = require('../plugins');
|
|
|
|
|
var utils = require('../../public/src/utils');
|
|
|
|
@ -50,7 +50,7 @@ module.exports = function(Categories) {
|
|
|
|
|
category = data.category;
|
|
|
|
|
|
|
|
|
|
var defaultPrivileges = ['find', 'read', 'topics:read', 'topics:create', 'topics:reply', 'posts:edit', 'posts:delete', 'topics:delete', 'upload:post:image'];
|
|
|
|
|
|
|
|
|
|
var privileges = require('../privileges');
|
|
|
|
|
async.series([
|
|
|
|
|
async.apply(db.setObject, 'category:' + category.cid, category),
|
|
|
|
|
function (next) {
|
|
|
|
@ -139,6 +139,7 @@ module.exports = function(Categories) {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Categories.copyPrivilegesFrom = function(fromCid, toCid, callback) {
|
|
|
|
|
var privileges = require('../privileges');
|
|
|
|
|
async.each(privileges.privilegeList, function(privilege, next) {
|
|
|
|
|
copyPrivilege(privilege, fromCid, toCid, next);
|
|
|
|
|
}, callback);
|
|
|
|
|