Ad Widget

Collapse

Beta Zabbix 1.5 - Map Permission Issue

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

    #1

    Beta Zabbix 1.5 - Map Permission Issue

    Everything in the new Beta Zabbix 1.5 works great and so far the only bug that I have found is with the maps. A Zabbix admin can see a map but a read-only user with access to all the groups can not see the maps if they have any items on it. Looking at the code to see if I can figure anything out. Cool thing is that this beta is very solid in terms of bugs. This is the only bug that I can find so far. Great work Zabbix Developers. This beta version is solid as a full release. :-)

    Now if anyone can help me figure out what is wrong with the maps. Maybe it's me.
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    If the user does not have access to ANY element of a map, the map won't be displayed. This is how it works (supposed to work) in both 1.4.x and 1.5.x.
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • Palmertree
      Senior Member
      • Sep 2005
      • 746

      #3
      Thanks Alexei for the quick reply.

      The user actually had all the elements in their group. Same group that worked in 1.4.4. Found something that seemed to help. Not sure if it is right but thought I would share it here. Negated an experssion and now it acts just like 1.4.4. Please let me know if this wrong but it seems to work perfectly. I even removed an element from the user's group and they could not longer see the map.

      In maps.inc.php I changed the following in red:

      From:
      Code:
                                              case SYSMAP_ELEMENT_TYPE_HOST_GROUP:
                                                      if( DBfetch(DBselect('select groupid from groups where groupid='.$se_data['elementid'])) &&
                                                         [COLOR="Red"] uint_in_array($se_data['elementid'],
                                                              get_accessible_groups_by_user($USER_DETAILS,PERM_READ_ONLY, PERM_MODE_LT, PERM_RES_IDS_ARRAY)))[/COLOR]
                                                      {
                                                              $result = false;
                                                      }
                                                      break;

      To:
      Code:
       
                                              case SYSMAP_ELEMENT_TYPE_HOST_GROUP:
                                                      if( DBfetch(DBselect('select groupid from groups where groupid='.$se_data['elementid'])) &&
                                                          [COLOR="Red"]!uint_in_array($se_data['elementid'],
                                                              get_accessible_groups_by_user($USER_DETAILS,PERM_READ_ONLY, PERM_MODE_LT, PERM_RES_IDS_ARRAY)))[/COLOR]
                                                      {
                                                              $result = false;
                                                      }
                                                      break;
      Last edited by Palmertree; 17-03-2008, 01:29.

      Comment

      • Aly
        ZABBIX developer
        • May 2007
        • 1126

        #4
        I cannot confirm this. May be there is other things that should be changed but this is not the one, definitely! PLZ double check user rights and an elements on the map.

        Try deleting/adding one by one. To find out which element is the reason of permission issue.

        P.S. Code you changed is the check if that host-group in denied for this user. I assume if you try to login by guest he will see this map too(if this element is the only one on the map).
        Last edited by Aly; 17-03-2008, 13:24.
        Zabbix | ex GUI developer

        Comment

        • Palmertree
          Senior Member
          • Sep 2005
          • 746

          #5
          Thanks Aly for the info. I am going to dig deeper into this like you suggested.

          Comment

          • Aly
            ZABBIX developer
            • May 2007
            • 1126

            #6
            Please keep me in touch. May be some test situation where we could see such behavior

            P.S. i tested simple situation by adding host-group to read-only perm to user, he could see the map with that group, then i changed in map elements host-group to the one that user hadn't perms and that user couldn't see the map anymore. So for now I suppose nothing should be fixed.
            Last edited by Aly; 17-03-2008, 17:02.
            Zabbix | ex GUI developer

            Comment

            • Palmertree
              Senior Member
              • Sep 2005
              • 746

              #7
              I think the problem might occur if the item is in 2 groups and the user only is allowed access to one group and not the other.

              Comment

              • Palmertree
                Senior Member
                • Sep 2005
                • 746

                #8
                I'm testing out different scenrios out and will let you know what I find out.

                Comment

                Working...