Ad Widget

Collapse

Zabbix custom modules checkPermission()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 0mih00
    Junior Member
    • Jan 2023
    • 1

    #1

    Zabbix custom modules checkPermission()

    Hi, I try to make my own simply module and I have problem with permission. Inside modules folder I created files structure like zabbix doc and added my action to zabbix menu. At this moment I guess that works properly because if I click on my new link, Zabbix run my action but on the screen I can see notify "You have no permissions to access this page." I`m logged at super admin account and my protected function checkPermission() looks like zabbix example:

    PHP Code:
               protected function checkPermissions(): bool {
                   
    $permit_user_types = [USER_TYPE_ZABBIX_ADMINUSER_TYPE_SUPER_ADMIN];
          
                   return 
    in_array($this→getUserType(), $permit_user_types);
               } 
    Is it possible to enable debug inside module file, maybe zabbix show something usable for me?​
Working...