juliocamarero/liferay-portal — pull request #429 by epgarcia (2012-06-28 15:02:57+00:00)
Title: LPS 26661 Prevent direct access to trashed files (Refactored)

Tests performed:

- Create a folder structure Folder 1 - Folder 2 - Folder 3 and add a document to Folder 3
- Remove folder 2
- Folder 2 is now in trash. You can navigate Folder 3 and document inside.
- You can see document thumbnail and preview images (their URL include showTrashEntries=1 and you have permissions to see the Trash Portlet).
- Copy the document URL and remove showTrashEntries. You get redirected to error page, since Portal returns NotSuchFileEntryException
- Copy the document URL (don't remove showTrashEntries) and log out. You get redirected to login page, since Portal returns a PrincipalException

isInTrashFolder and getTrashFolder methods now only available at LiferayFileVersion and DLFileVersion.