mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 02:55:58 +01:00 
			
		
		
		
	allow global mods to see banned users
This commit is contained in:
		| @@ -246,13 +246,16 @@ SocketUser.loadMore = function(socket, data, callback) { | ||||
| 		return callback(new Error('[[error:no-privileges]]')); | ||||
| 	} | ||||
|  | ||||
| 	var start = parseInt(data.after, 10), | ||||
| 		stop = start + 19; | ||||
| 	var start = parseInt(data.after, 10); | ||||
| 	var stop = start + 19; | ||||
|  | ||||
| 	async.parallel({ | ||||
| 		isAdmin: function(next) { | ||||
| 			user.isAdministrator(socket.uid, next); | ||||
| 		}, | ||||
| 		isGlobalMod: function(next) { | ||||
| 			user.isGlobalModerator(socket.uid, next); | ||||
| 		}, | ||||
| 		users: function(next) { | ||||
| 			user.getUsersFromSet(data.set, socket.uid, start, stop, next); | ||||
| 		} | ||||
| @@ -261,6 +264,9 @@ SocketUser.loadMore = function(socket, data, callback) { | ||||
| 			return callback(err); | ||||
| 		} | ||||
|  | ||||
| 		if (data.set === 'users:banned' && !results.isAdmin && !results.isGlobalMod) { | ||||
| 			return callback(new Error('[[error:no-privileges]]')); | ||||
| 		} | ||||
|  | ||||
| 		if (!results.isAdmin && data.set === 'users:online') { | ||||
| 			results.users = results.users.filter(function(user) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user