Simple Module Permissions

edited May 2015 in Modules
As per the documentation here:

* http://docs.getfuelcms.com/modules/tutorial#permissions

"Creating the Permissions"

Is there a way to do this programmatically after the module has been created?

Thanks.

Comments

  • edited 5:29PM
    If a simple module is generated via the command line then it will generate the permissions automatically:
    http://docs.getfuelcms.com/modules/generate

    You can also create the permissions via programmatically like so:
    $this->fuel->permissions->create_simple_module_permissions('{module}', array('create', 'edit', 'publish', 'delete'));
  • edited 5:29PM
    in which file should i write it??
  • edited 5:29PM
    I guess it depends on where you are wanting to do this programmatically but probably in your own controller. If you generate your simple modules, it will automatically create the general permissions for you:
    >php index.php fuel/generate/simple my_module
Sign In or Register to comment.