/**
  * {@inheritdoc}
  */
 public function serializeOne($id)
 {
     list($fileId, $ownerEntityClass, $ownerEntityId) = $this->attachmentManager->parseFileKey($id);
     if (!$this->securityFacade->isGranted('VIEW', new ObjectIdentity($ownerEntityId, $ownerEntityClass))) {
         throw new AccessDeniedException();
     }
     return parent::serializeOne($fileId);
 }