double_top.tpl does not obey permissions

Author Message

James Ward

Friday 01 September 2006 12:06:57 pm

Hi all,
I changed my anonymous user to only have access to user, login and set my site.ini to requireuserlogin. This gave me the login menu I expected.

I did not however expect the top menu to continue to list all areas of my site. I thought the fetch would not retrive any of areas which the annonymous user did not have access to. Is there a way I can make the double_top.tpl behave as I expected?

working at www.wardnet.com
blogging at www.jamesward.ca

Claudia Kosny

Saturday 02 September 2006 3:19:50 am

Hello James

it seems that this is a bug in EZ. If a user does not have any content read permissions at all, the limitationlist is set to false which again causes the sql limitation string to be empty. And an emtpy permission string means no restrictions.
It is roughly similar to this bug:
http://ez.no/community/bugs/role_permissions_problem_fetching_information_without_permissions

so you might want to update this one with your information or create a new one.

A workaround should be to give the user a new role which has content read permissions limited to some obscure class which you never use (you might need to create such adummy class beforehand).

Greetings from Luxembourg

Claudia

Kristof Coomans

Monday 04 September 2006 1:47:35 am

You can check first if the user is logged in:

{if $current_user.is_logged_in}
{* place menu code here *}
{/if}

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

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 18:15:39
Script start
Timing: Jan 18 2025 18:15:39
Module start 'layout'
Timing: Jan 18 2025 18:15:39
Module start 'content'
Timing: Jan 18 2025 18:15:40
Module end 'content'
Timing: Jan 18 2025 18:15:40
Script end

Main resources:

Total runtime0.7129 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 588.0469152.6406
Module start 'layout' 0.00540.0025 740.687539.4766
Module start 'content' 0.00800.7036 780.1641573.4063
Module end 'content' 0.71150.0014 1,353.570312.1250
Script end 0.7129  1,365.6953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.4371160.0002
Check MTime0.00130.1860160.0001
Mysql Total
Database connection0.00080.112210.0008
Mysqli_queries0.664193.1471590.0113
Looping result0.00100.1393570.0000
Template Total0.688596.620.3443
Template load0.00190.263820.0009
Template processing0.686696.308720.3433
Template load and register function0.00010.014710.0001
states
state_id_array0.00070.092410.0007
state_identifier_array0.00080.108020.0004
Override
Cache load0.00150.2161200.0001
Sytem overhead
Fetch class attribute can translate value0.00080.117530.0003
Fetch class attribute name0.00110.151750.0002
XML
Image XML parsing0.00120.167330.0004
class_abstraction
Instantiating content class attribute0.00000.001250.0000
General
dbfile0.00100.1387220.0000
String conversion0.00000.001240.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/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/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs