Share » Forums » Developer » Access an object containing a file,...

Access an object containing a file, but not the file itself.

Access an object containing a file, but not the file itself.

Thursday 04 January 2007 5:29:57 am - 3 replies

Author Message

Claudia Kosny

Thursday 04 January 2007 1:37:26 pm

Hi Atle

If you want to fetch a subtree no matter the permissions, you need add a parameter array(Limitation => array()) to the subtree function. Have a look at the code ofeZContentObjectTreeNode::subtree for clarification.

If you are not adverse to a bit of kernel hacking, you could try to change the module.php in kernel/content. Change the value of functions in the variable $ViewList['download'] to e.g 'my_download'. In the functionList below copy the entry for $FunctionList['read'] and change the key to 'my_download'. Now you can set the permissions for access to the download view the way you want. Please note that I have never tried this for the download, so test this first and keep a backup of the original module.php!

Claudia

Atle Pedersen

Friday 05 January 2007 5:41:21 am

Thank you Claudia, you give valuable help. My extension now works as required.

Betsy Gamrat

Saturday 20 January 2007 9:06:46 pm

Different idea:

Use a template to check if the user is logged in, and allow only authorized users to download the files.

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu