Hiding path in shop templates

Author Message

Richard Lundberg

Monday 16 August 2010 4:32:08 pm

I want to turn off the path display in certain shop views, in particular customerorderview and orderview in order to prevent a customer having access to the entire order list of all customers.

(I have enabled shop/adminstrate rights to customers so they can review their orders, but this gives the access to view all orders!!)

I have added

{set scope=global persistent_variable=hash('left_menu', false(),
'extra_menu', false(),
'show_path', false())}

to the top of the customerorderview.tpl template as this seems to be the method via ezpagedata() used by the frontpage template to turn of the path, but it does not seem to work for the shop template.

This is on 4.3

Any ideas?

www.peakm3.com

Peter Keung

Friday 27 August 2010 9:42:56 am

Have you tried ezpagedata_set?

However, even if you disable the link to the full order list, people can still access the URL directly. And even without "administrate" rights, it's easy to manipulate the shop/orderview/<order_number> URL to view other orders. Some workarounds for this privacy issue I've used in the past include building separate views or creating override templates with hack-ish permission checking.

http://www.mugo.ca
Mugo Web, eZ Partner in Vancouver, Canada

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 11:03:42
Script start
Timing: Jan 18 2025 11:03:42
Module start 'layout'
Timing: Jan 18 2025 11:03:42
Module start 'content'
Timing: Jan 18 2025 11:03:43
Module end 'content'
Timing: Jan 18 2025 11:03:43
Script end

Main resources:

Total runtime1.0219 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.0062 591.7656152.6250
Module start 'layout' 0.00620.0027 744.390639.4453
Module start 'content' 0.00891.0113 783.8359532.6406
Module end 'content' 1.02020.0016 1,316.47668.1641
Script end 1.0219  1,324.6406 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.3408160.0002
Check MTime0.00140.1378160.0001
Mysql Total
Database connection0.00130.123510.0013
Mysqli_queries0.973395.2446540.0180
Looping result0.00050.0521520.0000
Template Total0.988896.820.4944
Template load0.00230.223120.0011
Template processing0.986596.537720.4933
Template load and register function0.00010.011510.0001
states
state_id_array0.00070.072810.0007
state_identifier_array0.00080.081120.0004
Override
Cache load0.00190.1822170.0001
Sytem overhead
Fetch class attribute can translate value0.00080.078520.0004
Fetch class attribute name0.00080.080240.0002
XML
Image XML parsing0.00100.099720.0005
class_abstraction
Instantiating content class attribute0.00000.000640.0000
General
dbfile0.00230.2232230.0001
String conversion0.00000.000840.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 10
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs