mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 15:05:46 +01:00
check privs on getRecentReplies and getRecentTopicReplies
This commit is contained in:
@@ -11,17 +11,7 @@ var async = require('async'),
|
||||
SocketCategories = {};
|
||||
|
||||
SocketCategories.getRecentReplies = function(socket, cid, callback) {
|
||||
privileges.categories.can('read', cid, socket.uid, function(err, canRead) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
if (!canRead) {
|
||||
return callback(null, []);
|
||||
}
|
||||
|
||||
categories.getRecentReplies(cid, socket.uid, 4, callback);
|
||||
});
|
||||
categories.getRecentReplies(cid, socket.uid, 4, callback);
|
||||
};
|
||||
|
||||
SocketCategories.get = function(socket, data, callback) {
|
||||
|
||||
Reference in New Issue
Block a user