Liferay displays document automatically extracted metadata. When user uploads a document Liferay automatically store document metadata and document content to file system. Document default metadata will display when previews document. Document default metadata contains information about Author, created date, Modified Date, Company etc…

 

Some time we might require to hide document default metadata to for some security reasons. To achieve this we require to implement a hook. Hook requires to update a jsp page to show document default metadata to only OmniAdmin user. Find jsp page from bellow location from your Portlet ROOT folder,

/ROOT/html/portlet/document_library/view_file_entry.jsp

To know more about implement a Liferay hook follow link here. Find below change to view_file_entry.jsp page, by applying below validation; Liferay can stop showing document default metadata to normal portal users.

In the above snippet if we add an IF clause/condition to the original code then Liferay will not show/display document default metadata to normal portal users.