Forums / General / List of nodes a users can edit or read

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

eZ debug

Timing: Jan 18 2025 11:32:28
Script start
Timing: Jan 18 2025 11:32:28
Module start 'content'
Timing: Jan 18 2025 11:32:29
Module end 'content'
Timing: Jan 18 2025 11:32:29
Script end

Main resources:

Total runtime0.9685 sec
Peak memory usage4,096.0000 KB
Database Queries198

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0105 587.7266180.8359
Module start 'content' 0.01050.7915 768.5625583.4844
Module end 'content' 0.80210.1663 1,352.0469332.7500
Script end 0.9684  1,684.7969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.4311210.0002
Check MTime0.00160.1634210.0001
Mysql Total
Database connection0.00110.116110.0011
Mysqli_queries0.885191.38961980.0045
Looping result0.00230.23391960.0000
Template Total0.932996.320.4665
Template load0.00200.211120.0010
Template processing0.930996.120920.4654
Template load and register function0.00020.016010.0002
states
state_id_array0.00120.122210.0012
state_identifier_array0.00100.105420.0005
Override
Cache load0.00170.1795250.0001
Sytem overhead
Fetch class attribute can translate value0.00190.195940.0005
Fetch class attribute name0.00130.131850.0003
XML
Image XML parsing0.00170.178540.0004
class_abstraction
Instantiating content class attribute0.00000.001350.0000
General
dbfile0.00270.2790330.0001
String conversion0.00000.001330.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
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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 8

Time used to render debug report: 0.0002 secs