use wcf\data\comment\Comment;
use wcf\data\comment\response\CommentResponse;
use wcf\data\DatabaseObjectDecorator;
+use wcf\data\user\UserProfile;
use wcf\system\bbcode\BBCodeHandler;
use wcf\system\SingletonFactory;
use wcf\system\WCF;
return WCF::getSession()->getPermission($this->permissionCanModerate) ? true : false;
}
+ #[\Override]
+ public function canModerateObject(int $objectTypeID, int $objectID, UserProfile $user): bool
+ {
+ return (bool)$user->getPermission($this->permissionCanModerate);
+ }
+
/**
* Returns true if the current user may edit a comment/response.
*
use wcf\data\comment\Comment;
use wcf\data\comment\response\CommentResponse;
+use wcf\data\user\UserProfile;
/**
* Default interface for comment managers.
* @param int $objectTypeID
* @param int $objectID
* @return bool
+ * @deprecated 6.1
*/
public function canModerate($objectTypeID, $objectID);
+ /**
+ * Returns true if the user may moderate content identified by
+ * object type id and object id.
+ */
+ public function canModerateObject(int $objectTypeID, int $objectID, UserProfile $user): bool;
+
/**
* Returns the amount of comments per page.
*