Restricting access to the full view

Author Message

Nicolas OTTAVI

Monday 16 October 2006 1:47:39 am

Hi there,

As you may know, a lot of publication on line, can allow access to some articles to its registered users. But it is frequent that the general public have access to an excerpt of such a content (like in newspaper websites for instance).

It seems that eZ Publish does not allow restriction on views (which in this case of usage is damage), so my question is simple: how would you do (the simplest way for the editors) to achieve this functionality ?

Best Regards

Xavier Dutoit

Monday 16 October 2006 2:08:16 am

Where you display the teaser, force the system not to take into account the real access rights.

That's the limitation parameter in the fetch (give it an empty array and it's happy to display everything).

Then, when you click, you got the regular access rights, ie they have to log in.

X+

http://www.sydesy.com

Nicolas OTTAVI

Monday 16 October 2006 5:04:46 am

Thanks for your answer Xavier,

Am I wrong when I say this is only available for "list" fetching and not "tree" ?

Regards,
C.

Claudia Kosny

Monday 16 October 2006 8:05:47 am

Hi Claude

Just try it out...
As far as I know (I think Kristof mentioned this somewhere) the list and tree operators use the same php functions, just with different default values for the parameters, so specifying an limitation array should work for both list and tree fetching.

Greetings from Luxembourg

Claudia

Kristof Coomans

Tuesday 17 October 2006 12:13:01 am

You're right Claudia. For the curious ones, take a look in kernel/content/function_definition.php and search for $FunctionList['list'] and $FunctionList['tree']. The same story for list_count and tree_count.

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

Nicolas OTTAVI

Tuesday 17 October 2006 1:54:34 am

Yes,

It is what I was thinking. Now I do have the same "issue" on the search fetching function ... But I know where to look at ...

And I confirm that the limitation also work for the search fetch function ... That's nice

Thx,
C.

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:22:56
Script start
Timing: Jan 18 2025 11:22:56
Module start 'layout'
Timing: Jan 18 2025 11:22:56
Module start 'content'
Timing: Jan 18 2025 11:22:57
Module end 'content'
Timing: Jan 18 2025 11:22:57
Script end

Main resources:

Total runtime0.8261 sec
Peak memory usage4,096.0000 KB
Database Queries70

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 588.0313152.6406
Module start 'layout' 0.00650.0033 740.671939.4609
Module start 'content' 0.00990.8150 780.1328640.2031
Module end 'content' 0.82480.0013 1,420.335912.1563
Script end 0.8261  1,432.4922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4263160.0002
Check MTime0.00130.1607160.0001
Mysql Total
Database connection0.00070.090310.0007
Mysqli_queries0.764792.5709700.0109
Looping result0.00100.1177680.0000
Template Total0.793296.020.3966
Template load0.00220.261920.0011
Template processing0.791095.746420.3955
Template load and register function0.00020.021810.0002
states
state_id_array0.00110.129410.0011
state_identifier_array0.00080.100920.0004
Override
Cache load0.00190.2344330.0001
Sytem overhead
Fetch class attribute can translate value0.00090.105340.0002
Fetch class attribute name0.00100.118080.0001
XML
Image XML parsing0.00150.176140.0004
class_abstraction
Instantiating content class attribute0.00000.001680.0000
General
dbfile0.00080.1007220.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
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.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/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: 22
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs