/** * {@inheritDoc} */ public function deletePost(PostInterface $post) { if (!$this->postAcl->canDelete($post)) { throw new AccessDeniedException(); } $this->realManager->deletePost($post); }
/** * @param PostInterface $post * * @return boolean */ public function canDelete(PostInterface $post) { return $this->postAcl->canDelete($post); }