listing in treemenu a folder you don't have access to

Author Message

Giovanni Gigante

Thursday 21 April 2005 4:21:21 am

I have a folder containing articles that should be accessed by registered users only.
I also want this folder to always appear in the menu, but when the anonymous user tries to go inside, the login form must appear.

I have put this folder and its contents in a different section. This way the anonymous user cannot open it.
Unfortunately I have discovered that the treemenu operator (and the fetch function too) does not list folders you don't have access to. So for anonymous user this folder simply disappears, which is not what I want.

I have also tried to add a new policy for anonymous users like this: content/read/class(folder). This way the folder appears in the treemenu, but when the anonymous user opens it, it simply appears to be empty and the login form does not appear obviously.

Any idea?

thanks
Giovanni

Frederik Holljen

Monday 25 April 2005 11:41:16 pm

This is the way the built in treemenu works (because displaying the name of the nodes that you are not allowed to see is a security risk). The best sollution is probably to modify the menu code to do what you like (put it in an extension so you can upgrade easily).

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.