Forums / Setup & design / double_top.tpl does not obey permissions

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

eZ debug

Timing: Jan 20 2025 23:42:46
Script start
Timing: Jan 20 2025 23:42:46
Module start 'content'
Timing: Jan 20 2025 23:42:46
Module end 'content'
Timing: Jan 20 2025 23:42:46
Script end

Main resources:

Total runtime0.1709 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0085 591.0234180.8125
Module start 'content' 0.00850.0165 771.835994.0547
Module end 'content' 0.02500.1458 865.8906522.2500
Script end 0.1709  1,388.1406 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00362.1248200.0002
Check MTime0.00140.8261200.0001
Mysql Total
Database connection0.00080.488010.0008
Mysqli_queries0.113366.31221410.0008
Looping result0.00120.70001390.0000
Template Total0.145385.010.1453
Template load0.00090.548810.0009
Template processing0.144384.434610.1443
Override
Cache load0.00070.391410.0007
Sytem overhead
Fetch class attribute can translate value0.00080.485710.0008
XML
Image XML parsing0.00020.138110.0002
General
dbfile0.00774.5051200.0004
String conversion0.00000.005330.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs