/**
  * @param Attachment $entity
  *
  * @throws AccessDeniedException
  */
 protected function checkFoundEntity($entity)
 {
     parent::checkFoundEntity($entity);
     $attachmentTarget = $entity->getTarget();
     if ($attachmentTarget && !$this->securityFacade->isGranted('VIEW', $attachmentTarget)) {
         throw new AccessDeniedException();
     }
 }