Ad Widget

Collapse

Guest User and Main Menu (Zabbix v1.4.x)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Palmertree
    Senior Member
    • Sep 2005
    • 746

    #1

    Guest User and Main Menu (Zabbix v1.4.x)

    I am seeing main menus when just using the "Guest" account. Shouldn't the "Guest" account only show the "Login" menu?

    Has anyone else see this behavior on the 1.4.x versions of Zabbix? If so, please share how you fixed it.
    Last edited by Palmertree; 30-06-2007, 16:21.
  • Palmertree
    Senior Member
    • Sep 2005
    • 746

    #2
    Guest Menu Solution

    I found a way to lock down the "Main Menu" when guest or no one is logged in. Only the "login" menu is shown.

    I modified my /include/page_header.php as follows:

    HTML Code:
    // Check permissions for main menu
                    unset($deny);
                    if(!defined('ZBX_PAGE_NO_AUTHERIZATION'))
                    {
    
    // ADD GUEST CHECK BELOW
    // BEGIN GUEST CHECK
    
                            if($USER_DETAILS["alias"] == "guest")
                            {
                                    $deny = true;
                            }
    
    // END GUEST CHECK
    
                            if(isset($sub['user_type']))
                            {
                                    if($USER_DETAILS['type'] < $sub['user_type'])
                                            $deny = true;
                            }
    
                            if(isset($sub['node_perm']))
                            {
                                    if(!in_array($ZBX_CURNODEID,get_accessible_nodes_by_user(
                                            $USER_DETAILS,$sub['node_perm'],null,
                                            PERM_RES_IDS_ARRAY,$ZBX_CURNODEID)))
                                                    $deny = true;
                            }
    
                            if($label=='login')
                            {
                                    unset($deny);
                            }
                    }
    
    // End of main menu permissions checking

    Comment

    Working...