Simple module permissions

I'm trying to follow this documentation http://docs.getfuelcms.com/general/user-management, to create permissions for a simple module in the fuel Admin.The modules are active and accessible by me the admin but i can't create or assign permissions to other users.

i added a line like this

permission' => array('pages', 'create', 'edit', 'pages/upload' => 'pages/create', 'publish', 'delete'),
in
fuel/application/config/MY_fuel_modules.php, and the permissions still didn't show up in the admin panel

Comments

  • edited December 2013
    new to Fuelcms
  • edited 2:55PM
    No worries. The issue looks like that you are using "pages" when you should be using {module} instead (where module is the name of your module). Perhaps the easiest way is to use the "generate" functionality:
    http://docs.getfuelcms.com/modules/generate
    php index.php fuel/generate/simple {module}
  • edited 2:55PM
    the permissions i used above are just an example this is my exact code


    $config['modules']['site'] = array(
    'model_name' => 'siteposts_model',
    'model_location' => 'site',
    //'permission' => array('site','create', 'edit',=>'site/create','publish','delete' ),
    'sanitize_input' => array('xss', 'php', 'entities')
    );



    and i havent quite figured out the "generate" functionality, its done from the command prompt right? thanks for replying!
  • edited 2:55PM
    Yes... that's done via command line. This will create the normal generic permissions for a simple module which includes the following:
    {module}
    {module}/create
    {module}/edit
    {module}/publish
    {module}/delete

    The alternative is to just set those up in the CMS.

    With regards to MY_fuel_module.php, you don't really need to change the permission parameter unless the permissions for your simple module are different.
Sign In or Register to comment.