eZ Community » Forums » General » Permissions for content/history

Permissions for content/history

Permissions for content/history

Tuesday 07 January 2014 3:45:47 pm - 5 replies

Hello folks!

I created an frontend view for the content/history.tpl so my user can see previous versions of the content. My problem is that I cant find the permission to allow my users to see the history of any content.

But when I gave the user role no limitation to "content / all" they can see the history of any content. Sure, I could do this, but I dont want to allow my user to edit all content.

Have someone a clue where to set the permissions for content/history?

Modified on Tuesday 07 January 2014 4:22:21 pm by Tim Heise

Tuesday 07 January 2014 4:00:39 pm

When editing an existing user role, click "new policy", select content in the module selection list, then in the function list, select "versionread".

Tuesday 07 January 2014 4:21:54 pm

Thanks for your answer Thiago,

I tried "versionread" a lot, but it still doens't work. Do I need more permissions to see the history of content?

Tuesday 07 January 2014 4:54:51 pm

Just checked kernel/content/modules.php and found this:

$ViewList['history'] = array(
    'functions' => array( 'read', 'edit' ),
    'default_naviga ....

Which means that if you want to use the default history you need to give content read and edit access to the user. I know you don't want to do this, but I tried to give access content read and edit access to the anonymous user and it doesn't work, then I created a new role and gave access to the registered members.

What I recommend is to try to create a new module and function that is basically a copy of content/history, so you can check the code at: kernel/content/modules.php and kernel/content/history.php

As long as you are able to define your own functions when creating a new module, you will be able to give proper access to that module/function for the user group.

So, in your module.php you need to put:

$Module = array(
        "name" => 'mymodule'
$ViewList = array();
$ViewList['history'] = array(
        'functions' => array( 'history' ),
        'script' => 'history.php'
$FunctionList[ 'history' ] = array();

And then create the module.ini.append.php file, enable the new module, create the history.php based on kernel/content/history.php and so on.

Modified on Tuesday 07 January 2014 5:18:03 pm by Thiago Campos Viana

Tuesday 07 January 2014 5:01:24 pm

versionread is deprecated. If I  remember correctly you need content/edit permission

Tuesday 07 January 2014 5:22:38 pm

Thank you both for the answers! Now I know where the problem is!

I think I can work with your answers!

Many thanks!


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

36 542 Users on board!

Forums menu

Proudly Developed with from