Fixed permission check
authorMarcel Werk <burntime@woltlab.com>
Tue, 27 May 2014 19:16:08 +0000 (21:16 +0200)
committerMarcel Werk <burntime@woltlab.com>
Tue, 27 May 2014 19:16:08 +0000 (21:16 +0200)
wcfsetup/install/files/lib/system/comment/manager/UserProfileCommentManager.class.php

index d31989174a476a2394485adacc3cba286937d9c6..fbbee75b68a1202dcdb93e2b2ceb8fbc8e00b3f2 100644 (file)
@@ -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();