From: Cyperghost Date: Mon, 25 Mar 2024 10:00:44 +0000 (+0100) Subject: Run php-cs-fixer X-Git-Tag: 6.1.0_Alpha_1~142^2~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4d57ad2584d08a7e5070b8c6e0f61d8062de21a3;p=GitHub%2FWoltLab%2FWCF.git Run php-cs-fixer --- diff --git a/wcfsetup/install/files/lib/system/comment/manager/ArticleCommentManager.class.php b/wcfsetup/install/files/lib/system/comment/manager/ArticleCommentManager.class.php index 4ee1c76c56..834e6caea5 100644 --- a/wcfsetup/install/files/lib/system/comment/manager/ArticleCommentManager.class.php +++ b/wcfsetup/install/files/lib/system/comment/manager/ArticleCommentManager.class.php @@ -82,6 +82,7 @@ class ArticleCommentManager extends AbstractCommentManager implements IViewableL if (!$articleContent->getArticle()->canRead($user)) { return false; } + return (bool)$user->getPermission($this->permissionCanModerate); } diff --git a/wcfsetup/install/files/lib/system/comment/manager/ModerationQueueCommentManager.class.php b/wcfsetup/install/files/lib/system/comment/manager/ModerationQueueCommentManager.class.php index ea81183be4..9ebc60ddd2 100644 --- a/wcfsetup/install/files/lib/system/comment/manager/ModerationQueueCommentManager.class.php +++ b/wcfsetup/install/files/lib/system/comment/manager/ModerationQueueCommentManager.class.php @@ -30,7 +30,8 @@ class ModerationQueueCommentManager extends AbstractCommentManager implements IC public function canModerateObject(int $objectTypeID, int $objectID, UserProfile $user): bool { $entry = new ModerationQueue($objectID); - return ($entry->canEdit($user->getDecoratedObject())); + + return $entry->canEdit($user->getDecoratedObject()); } /** diff --git a/wcfsetup/install/files/lib/system/comment/manager/PageCommentManager.class.php b/wcfsetup/install/files/lib/system/comment/manager/PageCommentManager.class.php index d74209da1e..ee0c2294e3 100644 --- a/wcfsetup/install/files/lib/system/comment/manager/PageCommentManager.class.php +++ b/wcfsetup/install/files/lib/system/comment/manager/PageCommentManager.class.php @@ -81,6 +81,7 @@ class PageCommentManager extends AbstractCommentManager implements IViewableLike if (!$page->isAccessible($user->getDecoratedObject())) { return false; } + return (bool)$user->getPermission($this->permissionCanModerate); } 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 0727551ccc..3738efe6ce 100644 --- a/wcfsetup/install/files/lib/system/comment/manager/UserProfileCommentManager.class.php +++ b/wcfsetup/install/files/lib/system/comment/manager/UserProfileCommentManager.class.php @@ -104,12 +104,14 @@ class UserProfileCommentManager extends AbstractCommentManager implements /** @see UserProfile::isProtected() */ if ( !( - $user->getPermission('admin.general.canViewPrivateUserOptions') + $user->getPermission('admin.general.canViewPrivateUserOptions') || $userProfile->isAccessible('canViewProfile', $user->userID) - || $userProfile->userID === $user->userID) + || $userProfile->userID === $user->userID + ) ) { return false; } + return (bool)$user->getPermission($this->permissionCanModerate); }