In my Symfony 2 project, I have a page displaying object information. This page has a link to the file associated with this object.
The page is protected, and it can only be displayed if the user as a specific role. The expected role is not the same for each entity, so it is tested dynamically in Action.
My problem is that even if the page is protected, anyone can access the file through their URL. I would like it to be downloadable only if the role matches the one displayed on the page.
Any suggestion on how I should do this or where to start looking?
security symfony download
skwi
source share