check privs on getRecentReplies and getRecentTopicReplies

This commit is contained in:
barisusakli
2014-11-14 16:20:36 -05:00
parent c7ca2e2573
commit 6a3a3669d2
2 changed files with 30 additions and 37 deletions

View File

@@ -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) {