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.

eZ debug

Timing: Jan 18 2025 21:18:11
Script start
Timing: Jan 18 2025 21:18:11
Module start 'layout'
Timing: Jan 18 2025 21:18:11
Module start 'content'
Timing: Jan 18 2025 21:18:11
Module end 'content'
Timing: Jan 18 2025 21:18:11
Script end

Main resources:

Total runtime0.7369 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 588.1563152.6563
Module start 'layout' 0.00530.0026 740.812539.5078
Module start 'content' 0.00790.7277 780.3203496.2813
Module end 'content' 0.73570.0012 1,276.60168.1094
Script end 0.7369  1,284.7109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4409160.0002
Check MTime0.00130.1788160.0001
Mysql Total
Database connection0.00070.098810.0007
Mysqli_queries0.694294.2076540.0129
Looping result0.00060.0751520.0000
Template Total0.706995.920.3534
Template load0.00240.320320.0012
Template processing0.704595.604320.3522
Template load and register function0.00020.027710.0002
states
state_id_array0.00120.161010.0012
state_identifier_array0.00120.167120.0006
Override
Cache load0.00180.2410140.0001
Sytem overhead
Fetch class attribute can translate value0.00060.087620.0003
Fetch class attribute name0.00140.190330.0005
XML
Image XML parsing0.00050.065720.0002
class_abstraction
Instantiating content class attribute0.00000.001530.0000
General
dbfile0.00190.2521160.0001
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs