Ad Widget

Collapse

[1.7.2 r8300][BUG] Screen permissions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • uweiss
    Junior Member
    • Jun 2006
    • 27

    #1

    [1.7.2 r8300][BUG] Screen permissions

    I had the strange problem that i didn't saw three slideshows i made. then checked the screens itself. On some i had a permission denied.

    After searching around a bit in the php code, i found the reason.

    In the file include/screens.inc.php (Line 39) we have this code:
    Code:
    case SCREEN_RESOURCE_GRAPH:
      if(!isset($graphids)){
        $options = array();
        $options['nodeids'] = get_current_nodeid(true);
    
        if($perm == PERM_READ_WRITE) $options['editable'] = 1;
          $graphids = CGraph::get($options);
    
    //      $graphids = get_accessible_graphs($perm,array(),null,get_current_nodeid(true));
        }
    
        $result &= isset($graphids[$ac_data['resourceid']]);
        break;
    The problem now is that the isset function checks the key and not the value (what it should). The key is an increasing value starting at 0 only, and not the id of the graph!
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    not that i understood much, but please report this on the tracker
    Zabbix 3.0 Network Monitoring book

    Comment

    • rincewind
      Member
      • Oct 2009
      • 47

      #3
      Originally posted by uweiss
      I had the strange problem that i didn't saw three slideshows i made. then checked the screens itself. On some i had a permission denied.

      After searching around a bit in the php code, i found the reason.

      In the file include/screens.inc.php (Line 39) we have this code:
      Code:
      case SCREEN_RESOURCE_GRAPH:
        if(!isset($graphids)){
          $options = array();
          $options['nodeids'] = get_current_nodeid(true);
      
          if($perm == PERM_READ_WRITE) $options['editable'] = 1;
            $graphids = CGraph::get($options);
      
      //      $graphids = get_accessible_graphs($perm,array(),null,get_current_nodeid(true));
          }
      
          $result &= isset($graphids[$ac_data['resourceid']]);
          break;
      The problem now is that the isset function checks the key and not the value (what it should). The key is an increasing value starting at 0 only, and not the id of the graph!
      Confirm that bug, and it pretty annoying.

      Comment

      • richlv
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Oct 2005
        • 3112

        #4
        revision 8323 might have fixed - i'd suggest trying trunk
        Zabbix 3.0 Network Monitoring book

        Comment

        • uweiss
          Junior Member
          • Jun 2006
          • 27

          #5
          Yes, works fine now.

          Thanks
          Urs

          Comment

          Working...