Пример #1
0
 /**
  * {@inheritDoc}
  */
 public function findPostsByTopic(TopicInterface $topic, $page = 1)
 {
     $posts = $this->realManager->findPostsByTopic($topic, $page);
     foreach ($posts as $post) {
         if (!$this->postAcl->canView($post)) {
             throw new AccessDeniedException();
         }
     }
     return $posts;
 }
Пример #2
0
 /**
  * @param PostInterface $post
  *
  * @return boolean
  */
 public function canView(PostInterface $post)
 {
     return $this->postAcl->canView($post);
 }