From f55d1897c80f85e466f62485b9ae9825e4df595c Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 5 Aug 2014 22:59:29 -0400 Subject: [PATCH] fix categories.loadMore so it checks read permission --- src/socket.io/categories.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/socket.io/categories.js b/src/socket.io/categories.js index 1771311d3a..fb2fa98032 100644 --- a/src/socket.io/categories.js +++ b/src/socket.io/categories.js @@ -44,6 +44,10 @@ SocketCategories.loadMore = function(socket, data, callback) { return callback(err); } + if (!results.privileges.read) { + return callback(new Error('[[error:no-privileges]]')); + } + var start = parseInt(data.after, 10), end = start + results.settings.topicsPerPage - 1;