/** * {@inheritDoc} */ public function saveTopic(TopicInterface $topic) { if (!$this->topicAcl->canCreate()) { throw new AccessDeniedException(); } $newTopic = $this->isNewTopic($topic); if (!$newTopic && !$this->topicAcl->canEdit($topic)) { throw new AccessDeniedException(); } $this->realManager->saveTopic($topic); if ($newTopic) { $this->topicAcl->setDefaultAcl($topic); } }