v1.18.x
pichalite 9 years ago committed by Julian Lam
parent 5567733293
commit 6c09d3ca5f

@ -23,7 +23,7 @@ module.exports = function(privileges) {
'topics:reply': async.apply(helpers.isUserAllowedTo, 'topics:reply', uid, [topic.cid]),
read: async.apply(helpers.isUserAllowedTo, 'read', uid, [topic.cid]),
isOwner: function(next) {
next(null, parseInt(uid, 10) === parseInt(topic.uid, 10));
next(null, !!parseInt(uid, 10) && parseInt(uid, 10) === parseInt(topic.uid, 10));
},
isAdministrator: async.apply(user.isAdministrator, uid),
isModerator: async.apply(user.isModerator, uid, topic.cid),

Loading…
Cancel
Save