From 3aa4cc0b6c638d7dd0edab84a710e559217b504e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joshua=20R=C3=BCsweg?= Date: Mon, 6 Aug 2018 13:26:21 +0200 Subject: [PATCH] Fix comment permission bug See #2508 --- com.woltlab.wcf/templates/__commentJavaScript.tpl | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/com.woltlab.wcf/templates/__commentJavaScript.tpl b/com.woltlab.wcf/templates/__commentJavaScript.tpl index 1c5973b0d8..3dbe5c32dd 100644 --- a/com.woltlab.wcf/templates/__commentJavaScript.tpl +++ b/com.woltlab.wcf/templates/__commentJavaScript.tpl @@ -15,9 +15,8 @@ }); new {if $commentHandlerClass|isset}{@$commentHandlerClass}{else}WCF.Comment.Handler{/if}('{$commentContainerID}'); - {if MODULE_LIKE && $commentList->getCommentManager()->supportsLike() && $__wcf->getSession()->getPermission('user.like.canViewLike')} + {if MODULE_LIKE && $commentList->getCommentManager()->supportsLike() && $__wcf->getSession()->getPermission('user.like.canViewLike') || $__wcf->getSession()->getPermission('user.like.canLike')} require(['WoltLabSuite/Core/Ui/Reaction/Handler'], function(UiReactionHandler) { - var canDislike = {if LIKE_ENABLE_DISLIKE}true{else}false{/if}; var canLike = {if $__wcf->getUser()->userID && $__wcf->getSession()->getPermission('user.like.canLike')}true{else}false{/if}; var canLikeOwnContent = {if LIKE_ALLOW_FOR_OWN_CONTENT}true{else}false{/if}; @@ -28,10 +27,8 @@ renderAsButton: false, // permissions - canDislike: canDislike, canLike: canLike, canLikeOwnContent: canLikeOwnContent, - canViewSummary: false, // selectors containerSelector: 'li.comment', @@ -47,10 +44,8 @@ renderAsButton: false, // permissions - canDislike: canDislike, canLike: canLike, canLikeOwnContent: canLikeOwnContent, - canViewSummary: false, // selectors containerSelector: '.commentResponse', -- 2.20.1