I have a tool that publishes several hundred HTML pages daily. Although the directory structure is always the same, there are hundreds of pages and images that change.

I have been asked to put the daily updates on an existing Drupal server. However, the Drupal users have to log in and the published HTML and images should only be available to authenticated users.

Is there a way to create a directory of static html/images/js/css within Drupal that still require Drupal's authentication?

Comments

Anonymous’s picture

You'll need to build these HTML and images as pages in Drupal. So create a content type for these pages, then use https://www.drupal.org/project/content_access to prevent anonymous access to the content type.

I'm guessing this is for Drupal 7?

Arron.R’s picture

There are several thousand HTML pages and images; several hundred of them change each day. It would be a full time job for a whole team. A very boring full time job. That's definitely not going to happen.

P.S. Yes, Drupal 7.

Anonymous’s picture

Either way, you will still need to get the static content into drupal first. The question is how without the tedious workload?

You can try importing the HTML into drupal with one of these modules:

https://www.drupal.org/project/html_import
https://www.drupal.org/project/import_html

Arron.R’s picture

Found an old module that should do the job perfectly: https://www.drupal.org/project/contentprotector

Sam Moore’s picture

Can your HTML publishing platform emit XML or JSON? You could set up a Feeds importer to automate ingestion of the daily new content.

Arron.R’s picture

The publishing system only turns out HTML. The pages are massively interlinked, it relies on some fairly hefty JavaScript and there are also quite a lot of PDFs that it turns out.

I did look at Feeds but it was going to take several months of development and could have broken if there were any code changes on the publishing system.

The Content Protector module suits the job well. I know that it's a deeply unDrupal module but it means my effort can move to other problems. Long term the HTML will be getting its own web server anyway.