Forums / Setup & design / Restricting access to the full view

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.