mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-13 01:15:47 +01:00
fixed group hide for privilege groups
This commit is contained in:
@@ -235,7 +235,8 @@
|
|||||||
userTitle: values.userTitle,
|
userTitle: values.userTitle,
|
||||||
description: values.description,
|
description: values.description,
|
||||||
icon: values.icon || '',
|
icon: values.icon || '',
|
||||||
labelColor: values.labelColor || '#000000'
|
labelColor: values.labelColor || '#000000',
|
||||||
|
hidden: values.hidden || '0'
|
||||||
}, callback);
|
}, callback);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -265,7 +266,6 @@
|
|||||||
return callback(err);
|
return callback(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
Groups.hide(groupName);
|
|
||||||
db.setAdd('group:' + groupName + ':members', uid, callback);
|
db.setAdd('group:' + groupName + ':members', uid, callback);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,11 +96,13 @@ Categories.setGroupPrivilege = function(socket, data, callback) {
|
|||||||
return callback(new Error('[[error:invalid-data]]'));
|
return callback(new Error('[[error:invalid-data]]'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.set) {
|
groups[data.set ? 'join' : 'leave']('cid:' + data.cid + ':privileges:' + data.privilege, data.name, function (err) {
|
||||||
groups.join('cid:' + data.cid + ':privileges:' + data.privilege, data.name, callback);
|
if (err) {
|
||||||
} else {
|
return callback(err);
|
||||||
groups.leave('cid:' + data.cid + ':privileges:' + data.privilege, data.name, callback);
|
}
|
||||||
}
|
|
||||||
|
groups.hide('cid:' + data.cid + ':privileges:' + data.privilege, callback);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
Categories.groupsList = function(socket, cid, callback) {
|
Categories.groupsList = function(socket, cid, callback) {
|
||||||
|
|||||||
Reference in New Issue
Block a user