eZ Community » Forums » Developer » Module permissions... denied!
expandshrink

Module permissions... denied!

Module permissions... denied!

Friday 08 June 2012 3:15:36 pm - 1 reply

Hi there.

I've made a simple module, called newsletter. The module works (ehm... worked!).

I've defined 2 functions, create and read, and I need that Anonymous Users can access the "create" function.

That's how I call my module: I've created a normal article page with a form inside. This form call my module (action = "newsletter/new.php"blunk.gif Emoticon. When I do that, a "Denied Access" message appears.

To set permissions  I clicked on User Account tab, selected the Anonymous role and granted full access to all functions ('create' was enough, but just to be sure...) of my "newsletter" module .
Here's my module.php

 

  $Module = array( 'name' => 'newsletter',   
 
<span> </span>'variable_params' => false,
                        'functions' => array( 'create' ),                  
<span> </span>        'function' => array( 'script' => 'new.php' ) );
 
$ViewList= array();
$ViewList['list'] = array('script' => 'mylist.php',    
                                  'unordered_params' => array( 'offset' => 'Offset'),    
                                  'functions' => array('read'));
 
 
$FunctionList = array(); 
$FunctionList['create'] = array(); 
$FunctionList['read'] = array(); 

Modified on Friday 08 June 2012 3:32:12 pm by Simone Conti

Monday 11 June 2012 9:56:55 am

Hi, looks a little bit wrong. Have a look at existing extensions.

It should be 'script' => 'new.php',

and the action should be newsletter/create

Modified on Monday 11 June 2012 9:57:59 am by scrieler _

expandshrink

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

36 542 Users on board!

Forums menu