mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 11:05:54 +01:00 
			
		
		
		
	fix: #11906, remove retrieval of SSO data in getAllData internal method, only retrieve for calling user or admins, and only on edit page
This commit is contained in:
		| @@ -104,16 +104,6 @@ helpers.getUserDataByUserSlug = async function (userslug, callerUID, query = {}) | ||||
| 		canViewInfo: canViewInfo, | ||||
| 	}); | ||||
|  | ||||
| 	userData.sso = results.sso.associations.map((association) => { | ||||
| 		if (!isSelf) { | ||||
| 			delete association.deauthUrl; | ||||
| 			if (!association.associated) { | ||||
| 				delete association.url; | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| 		return association; | ||||
| 	}); | ||||
| 	userData.banned = Boolean(userData.banned); | ||||
| 	userData.muted = parseInt(userData.mutedUntil, 10) > Date.now(); | ||||
| 	userData.website = escape(userData.website); | ||||
| @@ -162,7 +152,6 @@ async function getAllData(uid, callerUID) { | ||||
| 		ips: user.getIPs(uid, 4), | ||||
| 		profile_menu: getProfileMenu(uid, callerUID), | ||||
| 		groups: groups.getUserGroups([uid]), | ||||
| 		sso: plugins.hooks.fire('filter:auth.list', { uid: uid, associations: [] }), | ||||
| 		canEdit: privileges.users.canEdit(callerUID, uid), | ||||
| 		canBanUser: privileges.users.canBanUser(callerUID, uid), | ||||
| 		canMuteUser: privileges.users.canMuteUser(callerUID, uid), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user