Access Rights for Item Actions

edited October 2015 in Modules
Hi

I'm slightly confused over the behaviour of the item_actions I have set up and was wondering if there's a permissions issue.

In MY_fuel_modules.php, I have defined this for one of my modules (products_model)
'item_actions' => array('save','view','publish','delete','duplicate','replace','create','others'=>array('../products/referee/' => 'Referee')) as when logged in as "admin", I get to see the button on my products item page. The button, takes you to a front-end page rendering of the product (laid out in a special way so the standard preview feature isn't applicable here).

If I login as a normal user however, for the button is missing. I've tried adding products_model/referee and products/referee to the permissions with no result. What permission should I add for this to work?

TIA

Comments

  • edited 12:24PM
    This took some digging..

    I got it by:

    Module:
    $config['modules']['boards'] = [ 'table_headers' => [ 'id', 'title', 'active', 'date_added' ], 'display_field' => 'title', 'default_col' => 'title', 'sanitize_input' => ['template','php'], 'hidden' => true, 'item_actions' => ['save','view','publish','delete','duplicate','replace','create','others' => ['../products/referee' => 'Referee']], 'permission' => [ 'boards', 'create', 'edit', 'delete', 'replace', 'publish', '../products/referee' ] ];

    Permission as written in the permissions module:

    boards/../products/referee

    I used a module I had called "Boards".
  • Works. Excellent. Thanks.
Sign In or Register to comment.