/** * {@inheritDoc} */ public function findTopicsByCategory(CategoryInterface $category, $page = 1) { $topics = $this->realManager->findTopicsByCategory($category, $page); foreach ($topics as $topic) { if (!$this->topicAcl->canView($topic)) { throw new AccessDeniedException(); } } return $topics; }
/** * @param TopicInterface $topic * * @return boolean */ public function canView(TopicInterface $topic) { return $this->topicAcl->canView($topic); }