List of nodes a users can edit or read

Author Message

John Smith

Tuesday 23 March 2010 5:30:07 am

Is there any way in templates, I can get a list of nodes a current logged in user can edit?

Hakim Bouras

Wednesday 24 March 2010 4:51:49 am

Hi John,

Maybe the "limitation" parameter of the list fetch could do the trick but since it is not documented....

You can still check each node once you are in the loop using the "can_edit " attribute of the node such as :

{if $node.can_edit }

do something

{/if}

Cheers,

Hakim Bouras
PRISMALOG - Creation de site Internet

Nicolas Pastorino

Wednesday 24 March 2010 4:59:51 am

"

Maybe the "limitation" parameter of the list fetch could do the trick but since it is not documented....

"

This parameter is, from what i know and have played with it, to emulate a user's access rights, instead of using the current user's access rights.

Other than that, as you are saying Hakim, i am afraid the "loop over all concerned nodes and check one by one" method should be used..

Cheers !

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

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 16:23:55
Script start
Timing: Jan 18 2025 16:23:55
Module start 'layout'
Timing: Jan 18 2025 16:23:55
Module start 'content'
Timing: Jan 18 2025 16:23:56
Module end 'content'
Timing: Jan 18 2025 16:23:56
Script end

Main resources:

Total runtime0.9840 sec
Peak memory usage4,096.0000 KB
Database Queries61

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 589.0469152.6250
Module start 'layout' 0.00680.0031 741.671939.4453
Module start 'content' 0.00990.9727 781.1172578.4063
Module end 'content' 0.98260.0014 1,359.523412.1563
Script end 0.9839  1,371.6797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.4061160.0002
Check MTime0.00140.1376160.0001
Mysql Total
Database connection0.00100.103310.0010
Mysqli_queries0.930394.5497610.0153
Looping result0.00060.0609590.0000
Template Total0.956597.220.4782
Template load0.00220.221620.0011
Template processing0.954396.980720.4771
Template load and register function0.00060.060110.0006
states
state_id_array0.00070.075010.0007
state_identifier_array0.00060.063320.0003
Override
Cache load0.00190.1880250.0001
Sytem overhead
Fetch class attribute can translate value0.00080.079730.0003
Fetch class attribute name0.00140.143350.0003
XML
Image XML parsing0.00110.107830.0004
class_abstraction
Instantiating content class attribute0.00000.000950.0000
General
dbfile0.00090.0918220.0000
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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/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/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 8

Time used to render debug report: 0.0001 secs