Jump to content

Permission for Module


mrkhan
 Share

Recommended Posts

Hello,

The day i start using PW and i Love and its really great product and I always get great support here too.

I run into issue and i want know how to solve it.
I am using import from CSV module ( http://modules.processwire.com/modules/import-pages-csv/ ) and its working fine.

I have one user group (webmaster) for and add/ edit pages, i want to give access to that group.

Like when that group Login they can access the Module and import file to add pages.

I tried many options like i create a new permission as (import-pages-csv) and give that permission to that group but not working.

Thanks
 

 

Link to comment
Share on other sites

The ImportPagesCSV module does not include a permission in the getModuleInfo() method, so you would need to edit the module file to add one. Bear in mind that this would be overwritten if you later update the module.

public static function getModuleInfo() {
    return array(
        'title' => 'Import Pages from CSV', 
        'version' => 106, 
        'summary' => 'Import CSV files to create ProcessWire pages.',
        'singular' => true, 
        'autoload' => false,
        'permission' => 'import-csv',
        );
}

Refresh the module cache, create custom permission 'import-csv' and give that permission to any role that is allowed to use the module.

  • Like 4
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...