mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 11:05:54 +01:00 
			
		
		
		
	closes #6557
This commit is contained in:
		| @@ -32,6 +32,7 @@ module.exports = function (privileges) { | ||||
| 					'topics:read': async.apply(helpers.isUserAllowedTo, 'topics:read', uid, cids), | ||||
| 					read: async.apply(helpers.isUserAllowedTo, 'read', uid, cids), | ||||
| 					'posts:edit': async.apply(helpers.isUserAllowedTo, 'posts:edit', uid, cids), | ||||
| 					'posts:history': async.apply(helpers.isUserAllowedTo, 'posts:history', uid, cids), | ||||
| 					'posts:view_deleted': async.apply(helpers.isUserAllowedTo, 'posts:view_deleted', uid, cids), | ||||
| 				}, next); | ||||
| 			}, | ||||
| @@ -39,7 +40,8 @@ module.exports = function (privileges) { | ||||
| 				var privileges = pids.map(function (pid, i) { | ||||
| 					var isAdminOrMod = results.isAdmin || results.isModerator[i]; | ||||
| 					var editable = isAdminOrMod || (results.isOwner[i] && results['posts:edit'][i]); | ||||
| 					var viewDeletedPosts = isAdminOrMod || (results.isOwner[i] && results['posts:view_deleted'][i]); | ||||
| 					var viewDeletedPosts = isAdminOrMod || results.isOwner[i] || results['posts:view_deleted'][i]; | ||||
| 					var viewHistory = isAdminOrMod || results.isOwner[i] || results['posts:history'][i]; | ||||
|  | ||||
| 					return { | ||||
| 						editable: editable, | ||||
| @@ -48,6 +50,7 @@ module.exports = function (privileges) { | ||||
| 						isAdminOrMod: isAdminOrMod, | ||||
| 						'topics:read': results['topics:read'][i] || isAdminOrMod, | ||||
| 						read: results.read[i] || isAdminOrMod, | ||||
| 						'posts:history': viewHistory, | ||||
| 						'posts:view_deleted': viewDeletedPosts, | ||||
| 					}; | ||||
| 				}); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user