mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
Admin option to allow all users to view votes (#5534)
* Admin option to allow all users to view votes * Fix </strong></strong>
This commit is contained in:
@@ -6,6 +6,7 @@ var db = require('../../database');
|
||||
var user = require('../../user');
|
||||
var posts = require('../../posts');
|
||||
var privileges = require('../../privileges');
|
||||
var meta = require('../../meta');
|
||||
var helpers = require('./helpers');
|
||||
|
||||
module.exports = function (SocketPosts) {
|
||||
@@ -16,6 +17,9 @@ module.exports = function (SocketPosts) {
|
||||
|
||||
async.waterfall([
|
||||
function (next) {
|
||||
if (parseInt(meta.config.votesArePublic, 10) !== 0) {
|
||||
return next(null, true);
|
||||
}
|
||||
privileges.categories.isAdminOrMod(data.cid, socket.uid, next);
|
||||
},
|
||||
function (isAdminOrMod, next) {
|
||||
|
||||
Reference in New Issue
Block a user