[TECHNICAL-SUPPORT] LPS-32718 Ensure VIEW permission checking on DLFileEntryTypes (file types) where necessary

Hi Sergio,

This is the pull I made to fix the problem we had discussed last week in emails (http://in.liferay.com/web/global.engineering/forums/-/message_boards/message/1234333)

I have added several comments to my changes.
@moltam89 and I have executed some test cases and found some problem.

##edit_file_entry
- A user should be able to see files (if he has VIEW permission on the folder, of course) even if he doesn't have VIEW perm. for the DLFileEntryType associated to the given file.
- If this user has UPDATE permission on this file, he can open the file for editing, but can't see the current fileType displayed, but upon a Save action, he could modify the association to e.g. Basic Document type, even if he changed e.g. the title only! >>> What should we display in this case?

##edit_folder
If the folder has fileType restrictions and the current user doesn't have VIEM permission for this/these type(s), he won't be able to all information about the file, but, upon a save, he would accidentally overwrite the restrictions, again!

This is only one example.

Could you take a look at my changes and correct me if I made something wrong?

Thanks,
Tibor