Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

List Action permissions

edited January 2017 in Modules

I've having trouble with user permissions. Anyone offer some advice?

I have a simple module with the following registered in MY_fuel_modules:
'list_actions' => array('admin_subscriptions/report' => 'Report','membercategories' => 'Member Categories'),

I have fuel_permissions set up for "admin_subscriptions", "admin_subscriptions/report" and "membercategories" and my user has them ticked in their profile.

As super admin, the buttons appear on the simple module list view as expected. As a normal user with permissions set however, they do not. If the normal user visits the URLs directly, they work as expected.

Any ideas on why the list action buttons are not appearing? Fuel v1.3.2



  • So it seems line 48 of fuel/modules/fuel/views/_blocks/module_list_actions.php has an "if" statement
    if ($this->fuel->auth->has_permission($this->permission, $action)) :
    where $this->permission is an array of the standard permission types (create/edit/delete/publish/export).

    By remarking this "if" statement out, my buttons now appear (which is a suitable hack for my purposes) but we could perhaps do with enhancing this code segment to allow for explicit permissions?
  • edited 2:26PM
    Did you also add it to the module's configuration permission array in your fuel/application/config/MY_fuel_modules?
    $config['modules']['admin_subscriptions'] = array( ... 'permission' => array( 'admin_subscriptions', 'create', 'edit', 'publish', 'delete', 'admin_subscriptions/report', ),
Sign In or Register to comment.