From 0fc237c2ce3f45644e5c27a7336ae32f37e368e2 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Tue, 27 May 2014 21:16:08 +0200 Subject: [PATCH] Fixed permission check --- .../comment/manager/UserProfileCommentManager.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wcfsetup/install/files/lib/system/comment/manager/UserProfileCommentManager.class.php b/wcfsetup/install/files/lib/system/comment/manager/UserProfileCommentManager.class.php index d31989174a..fbbee75b68 100644 --- a/wcfsetup/install/files/lib/system/comment/manager/UserProfileCommentManager.class.php +++ b/wcfsetup/install/files/lib/system/comment/manager/UserProfileCommentManager.class.php @@ -130,6 +130,10 @@ class UserProfileCommentManager extends AbstractCommentManager implements IViewa * @see \wcf\system\like\IViewableLikeProvider::prepare() */ public function prepare(array $likes) { + if (!WCF::getSession()->getPermission('user.profile.canViewUserProfile')) { + return; + } + $commentLikeObjectType = ObjectTypeCache::getInstance()->getObjectTypeByName('com.woltlab.wcf.like.likeableObject', 'com.woltlab.wcf.comment'); $commentIDs = $responseIDs = array(); -- 2.20.1