View Permissions in new module extension

Author Message

anne martinet

Friday 25 July 2008 2:39:49 am

Hello,

I have an extension "helloworld", with a module helloworld and a view helloview.
In extension/helloworld/modules/helloworld/module.php I have initialised the module, the view, and I change permission. Like that:

<?php

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

?>

But this permission change nothing. The default permission stay. When I want access to my view (.../helloworld/helloview/) I could
login me. But I want to granted access to users anonymous.

What's wrong?

Thanks.

Bruce Morrison

Friday 25 July 2008 3:22:50 am

Hi Anne

You have 2 options:
1) Via Roles

Go into the admin -> User Accounts tab -> Roles and policies -> Anonymous -> Edit -> New Policy

You should see your module there, select that and Click on "Grant Access to one Function"

You should then see "read" in the Function dropdown, select this and "Grant Full Access"

2) via site.ini
[RoleSettings]
PolicyOmitList[]=helloworld/helloview
place this option in the extensions site.ini.append.php.

Note: This overrides any Role permissions and will grant access to all users, so be careful using this option.

HTH

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

anne martinet

Friday 25 July 2008 3:56:05 am

Thank you, for your answer.

But the solution that I use, doesn't work ?
It's not possible to give roles to a view, like I do?

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.