How to remove PDF links and Download links?

My workplace requires that we prevent users from downloading the documents or the PDFs.

We need a way to force users to only view/edit content directly in the Nuxeo interface.

The first thing I want to do is completely remove the download and PDF links from the interface. Then I will port all existing documents into “Note” objects, directly in the Nuxeo interface.

Can this be done? Is their a better way to achieve this?

0 votes

1 answers

1527 views

ANSWER

I have been beating my head against the wall called "Nuxeo Studio". The PDF documentation indicates that I can configure (disable) the document facet "downloadable". This facet does not exist in Nuxeo Studio…
11/22/2012



The problem is that in 5.5 version the method “isDownloadable” is never used in code or configuration files.

The PDF link appears when there is a proper converter. It means that you can hide the link by removing the conversion configuration for PDF. But there will be still problem with the download link.

Finally, you can edit xhtml files or create new and edit proper widgets and include them in your bundle. Most of them are in the nuxeo-platform-webapp bundle (content_widget_template.xhtml, extend_file_widget.xhtml, extend_sufile_widget.xhtml)

0 votes



Thank you, Adam. It is difficult for me to come to terms with the fact that this much hoop-jumping is required to do something so seemingly simple. Nevertheless, I will try to figure out these widgets you refer to. The documentation covering customization is nearly impossible to follow…
11/22/2012

Well, at first I thought it was working. I removed the code from content_widget_template.xhtml which creates the download link. The link disappeared. After restarting Nuxeo, the link reappears because all files in /var/lib/nuxeo/server/nxserver/nuxeo.war/widgets/summary are replaced when Nuxeo restarts! Arrrrgggh!
11/22/2012

You need to create your own bundle with modified files (the jar file). Remember to include "<require>org.nuxeo.ecm.webapp.ui</require>" in your "deployment-fragment.xml"
11/22/2012

While I appreciate your help, I can honestly say I have no idea what you are talking about. If that is really the only way to get things done in Nuxeo, then I suspect I have chosen the wrong DM solution.

But thank you for offering help!

11/22/2012

A simpler approach would be to create a shell script that replaces the content_widget_template.xhtml with my own version and then stick the shell script in my crontab to fire every minute. That's how I changed my logo, and it works. At least then I would feel like I know what the system is doing…
11/22/2012