From: Cyperghost Date: Fri, 22 Mar 2024 10:31:34 +0000 (+0100) Subject: Revert "Allow the `SessionHandler` as `$user` parameter, too" X-Git-Tag: 6.1.0_Alpha_1~142^2~16 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f370c23af93232d2f8c4bb80ed7ca9b96cb851c1;p=GitHub%2FWoltLab%2FWCF.git Revert "Allow the `SessionHandler` as `$user` parameter, too" This reverts commit ee8b210549eb81e86ce76fb58db153936fb5a791. --- diff --git a/wcfsetup/install/files/lib/system/comment/manager/AbstractCommentManager.class.php b/wcfsetup/install/files/lib/system/comment/manager/AbstractCommentManager.class.php index 3ecfbeb525..b2fb5fd579 100644 --- a/wcfsetup/install/files/lib/system/comment/manager/AbstractCommentManager.class.php +++ b/wcfsetup/install/files/lib/system/comment/manager/AbstractCommentManager.class.php @@ -7,7 +7,6 @@ use wcf\data\comment\response\CommentResponse; use wcf\data\DatabaseObjectDecorator; use wcf\data\user\UserProfile; use wcf\system\bbcode\BBCodeHandler; -use wcf\system\session\SessionHandler; use wcf\system\SingletonFactory; use wcf\system\WCF; @@ -163,7 +162,7 @@ abstract class AbstractCommentManager extends SingletonFactory implements IComme } #[\Override] - public function canModerateObject(int $objectTypeID, int $objectID, SessionHandler|UserProfile $user): bool + public function canModerateObject(int $objectTypeID, int $objectID, UserProfile $user): bool { return (bool)$user->getPermission($this->permissionCanModerate); } diff --git a/wcfsetup/install/files/lib/system/comment/manager/ICommentManager.class.php b/wcfsetup/install/files/lib/system/comment/manager/ICommentManager.class.php index 99d8a1f6da..5500208cd3 100644 --- a/wcfsetup/install/files/lib/system/comment/manager/ICommentManager.class.php +++ b/wcfsetup/install/files/lib/system/comment/manager/ICommentManager.class.php @@ -5,7 +5,6 @@ namespace wcf\system\comment\manager; use wcf\data\comment\Comment; use wcf\data\comment\response\CommentResponse; use wcf\data\user\UserProfile; -use wcf\system\session\SessionHandler; /** * Default interface for comment managers. @@ -78,7 +77,7 @@ interface ICommentManager * Returns true if the user may moderate content identified by * object type id and object id. */ - public function canModerateObject(int $objectTypeID, int $objectID, SessionHandler|UserProfile $user): bool; + public function canModerateObject(int $objectTypeID, int $objectID, UserProfile $user): bool; /** * Returns the amount of comments per page.