Share » Forums » Setup & design » fetch limitation parameter

fetch limitation parameter

fetch limitation parameter

Tuesday 24 January 2006 5:25:55 pm - 3 replies

Author Message

Kristof Coomans

Tuesday 24 January 2006 11:25:26 pm

Take a look at eZContentObjectTreeNode::createPermissionCheckingSQLString. It gets called with the limitation array you provided, and adds extra SQL conditions according to the entries in the limitation array. An emtpy limitation array should result in no extra conditions, so it disables any policy checking.

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

Ɓukasz Serwatka

Tuesday 24 January 2006 11:47:11 pm

Example which will work is:

{def $objects=fetch(content, list, hash(parent_node_id, $node.node_id, 
                                       limitation, array() ) )}

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

James Ward

Wednesday 25 January 2006 8:50:42 am

Thanks Lukasz,
I had actually tried that way first but thought it was not working. My problem was in my understanding of what you can and can not do with the fetched information. After the object fetch without limitation I was attempting to view the node with the following:

{node_view_gui view=full content_node=$objects[0]}

Which obviously is not allowed, I assume because the fetches within that node view will be restricted by the permisison limitations.

As soon as I used the following I was able to see information within the restricted node:

{attribute_view_gui attribute=$objects[0].data_map.name}

In retrospect this makes complete sense and is a logical way for the limitation parameter to work.

Thanks for all your help.

working at www.wardnet.com
blogging at www.jamesward.ca

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu