2

I want to disable access to the view display page of file by url like file/fid.

What's the good way for this? I have tried to use the hook_node_view() but it not called for the files.

enter image description here

2 Answers 2

2

I have finally used the RABBIT HOLE module, it contains a sub-module for managing file_entity! :)

enter image description here

0

You can do this by using below ways :

  1. Unpublish your node

  2. Node Page Disable module

Allows easy UI access and disabling of the path /node when not used. This was inspired by a security consideration in the Production Check Module.

  1. Restrict node page view

Have you ever used a slideshow nodetype that you need to be published but don't want the node be accessible by itself using then node/XXX path? This module is for you!

With this module you can disable direct access to node pages (node/XXX) based on nodetypes and permissions.

Enable the module and don't forget to configure your permissions.

2
  • Thanks for your reply! I prefer to use maintained modules and I already used Rabbit Hole for another project, so I opted for Rabbit Hole but your solution probably works! Commented May 15, 2015 at 13:48
  • Welcome @kxxxxoo.
    – Nishant
    Commented May 18, 2015 at 4:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.