mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 02:55:58 +01:00 
			
		
		
		
	chore: remove deprecated plugin hook filter:privileges:isUserAllowedTo [breaking]
				
					
				
			Use `filter:privileges:isAllowedTo` instead.
This commit is contained in:
		| @@ -9,7 +9,6 @@ const Hooks = {}; | |||||||
| module.exports = Hooks; | module.exports = Hooks; | ||||||
|  |  | ||||||
| Hooks.deprecatedHooks = { | Hooks.deprecatedHooks = { | ||||||
| 	'filter:privileges:isUserAllowedTo': 'filter:privileges:isAllowedTo',	// 👋 @ 1.17.0 |  | ||||||
| 	'filter:router.page': 'response:router.page',	// 👋 @ 2.0.0 | 	'filter:router.page': 'response:router.page',	// 👋 @ 2.0.0 | ||||||
| }; | }; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -34,7 +34,6 @@ helpers.isAllowedTo = async function (privilege, uidOrGroupName, cid) { | |||||||
| 		allowed = await isAllowedToCids(privilege, uidOrGroupName, cid); | 		allowed = await isAllowedToCids(privilege, uidOrGroupName, cid); | ||||||
| 	} | 	} | ||||||
| 	if (allowed) { | 	if (allowed) { | ||||||
| 		({ allowed } = await plugins.hooks.fire('filter:privileges:isUserAllowedTo', { allowed: allowed, privilege: privilege, uid: uidOrGroupName, cid: cid })); |  | ||||||
| 		({ allowed } = await plugins.hooks.fire('filter:privileges:isAllowedTo', { allowed: allowed, privilege: privilege, uid: uidOrGroupName, cid: cid })); | 		({ allowed } = await plugins.hooks.fire('filter:privileges:isAllowedTo', { allowed: allowed, privilege: privilege, uid: uidOrGroupName, cid: cid })); | ||||||
| 		return allowed; | 		return allowed; | ||||||
| 	} | 	} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user