Bypass file download permissions check

Author Message

Brendan Pike

Monday 16 February 2009 9:59:16 pm

Although it seems unlikely I am hoping there is some way to pass or create a download link from templates that allows policies to be bypass file download permission checks a little like fetch 'limitation', array().

I don't wish to give users read access to this entire class, but would love it if I could apply class attribute level permissions. Since this isn't possible in eZ publish without hacks can anyone suggest ant work-arounds?

Thanks

www.dbinformatics.com.au

We are always interested in hearing from experienced eZ PHP programmers and eZ template designers interested in contract work.

Kristof Coomans

Tuesday 17 February 2009 12:11:35 am

Hi Brendan,

You can create a new module/view, similar to content/dowload (see kernel/content/download.php), that doesn't check any policies for certain content classes.

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

Brendan Pike

Tuesday 17 February 2009 5:53:30 pm

Thanks Kristof

I suspected it would require an extension, could be an opportunity for me to learn how to create a basic extension. :)

Cheers

www.dbinformatics.com.au

We are always interested in hearing from experienced eZ PHP programmers and eZ template designers interested in contract work.

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

Main resources:

Total runtime0.8062 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 589.9297152.6406
Module start 'layout' 0.00580.0032 742.570339.4609
Module start 'content' 0.00900.7958 782.0313529.1094
Module end 'content' 0.80470.0014 1,311.140612.3125
Script end 0.8061  1,323.4531 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4271160.0002
Check MTime0.00140.1698160.0001
Mysql Total
Database connection0.00070.090510.0007
Mysqli_queries0.761194.4147570.0134
Looping result0.00050.0586550.0000
Template Total0.775196.220.3876
Template load0.00210.258520.0010
Template processing0.773095.892620.3865
Template load and register function0.00010.016510.0001
states
state_id_array0.00100.125810.0010
state_identifier_array0.00080.099520.0004
Override
Cache load0.00170.2087140.0001
Sytem overhead
Fetch class attribute can translate value0.00100.126020.0005
Fetch class attribute name0.00100.121740.0002
XML
Image XML parsing0.00050.064420.0003
class_abstraction
Instantiating content class attribute0.00000.001240.0000
General
dbfile0.00070.0879160.0000
String conversion0.00000.001140.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
3content/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/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: 9
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs