enhavo icon indicating copy to clipboard operation
enhavo copied to clipboard

[MediaBundle] Non-public media files

Open FabianLiebl opened this issue 3 years ago • 1 comments

Media files connected to non-public entities are always available if you know their url. If these files are indexed by search engines or manually linked by other sites, they will still be valid after the containing entity has been set to private.

Possible solutions:

  1. Public flag on File entity, cascaded from parent entity. High performance, but possible cause for synchronization problems.
  2. Symfony Voter system whenever a file is supposed to be displayed. Slows down performance on File display (SEO relevant), but less error prone and good flexibility/code quality.

FabianLiebl avatar Sep 26 '22 08:09 FabianLiebl

@FabianLiebl can this be done by overwriting enhavo service enhavo_media.security.default_authorization_checker using a custom AuthorizationCheckerInterface?

indivisualvj avatar Nov 13 '24 07:11 indivisualvj