public function can_view_discussion(stdClass $user, discussion_entity $discussion) : bool {
        $forumrecord = $this->get_forum_record();
        $discussionrecord = $this->get_discussion_record($discussion);
        $context = $this->get_context();

        return forum_user_can_see_discussion($forumrecord, $discussionrecord, $context, $user);
    }