Jump to content
nabo

Custom admin page permission

Recommended Posts

Hello

I created a module to import page and connected the process with a new admin page directly visible in the main menu.
I also set the permission to the module

'permission' => 'importposts'

and add the permission to a particular role

... but this link doesn't appear when I'm logged in with the role different to superuser.

What's wrong?

Share this post


Link to post
Share on other sites

Can we see the code of your module? This is an example I am using:

class ProcessEARDashboard extends Process {
  public static function getModuleInfo() {
    return [
      'title' => 'EAR Dashboard',
      'version' => '0.0.1',
      'summary' => 'EAR Dashboard',
      'icon' => 'gears',
      'requires' => [],
      'installs' => [
        'ProcessEARNew',
        'ProcessEARImport',
      ],
      
      'permission' => 'ear-dashboard',
      'permissions' => ['ear-dashboard' => 'May see the EAR dashboard'],
      
      'page' => [
        'name' => 'ear',
        'title' => 'EAR Dashboard'
      ],
    ];
  }

 

  • Like 1

Share this post


Link to post
Share on other sites

Thanks @bernhard

I created the page after the installation of module and it doesn't work.
So I uninstall the module and edit it addings permissions and page and now it works as I expected 🙂
thanks again!

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...