/**
  * {@inheritDoc}
  */
 public function addThread(ThreadInterface $thread)
 {
     if (!$this->threadAcl->canCreate()) {
         throw new AccessDeniedException();
     }
     $this->realManager->addThread($thread);
     $this->threadAcl->setDefaultAcl($thread);
 }
 /**
  * {@inheritDoc}
  */
 public function saveThread(ThreadInterface $thread)
 {
     if (!$this->threadAcl->canCreate()) {
         throw new AccessDeniedException();
     }
     $newThread = $this->isNewThread($thread);
     if (!$newThread && !$this->threadAcl->canEdit($thread)) {
         throw new AccessDeniedException();
     }
     $this->realManager->saveThread($thread);
     if ($newThread) {
         $this->threadAcl->setDefaultAcl($thread);
     }
 }