Jump to content

Custom admin page permission


nabo
 Share

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?

Link to comment
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
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...