Ticket #286 (reopened defect)

Opened 3 months ago

Last modified 7 weeks ago

Bug Acl : Définition d'une ressource access avec Hosts Groups et Services Groups

Reported by: max511 Owned by:
Priority: minor Milestone: Centreon-2.0
Component: CentWeb Version:
Keywords: Cc:

Description

Bonjour,

J'ai défini un hostgroup contenant des équipements puis pour ces mêmes équipements un service group contenant une vue de certains services.

Problème: Si dans la définition d'une ressource access, j'ajoute mon hostgroups et mon service groups, dans ce cas, mon utilisateur voit uniquement les services définis dans le service groups. Si j'ajoute uniquement le hostgroup et pas le service group, l'utilisateur voit bien mes hosts et les services associés et inversement si j'ajoute seulement mon service groups

Merci

Version de centreon: RC7

Attachments

centAcl.php (6.1 kB) - added by max511 2 months ago.

Change History

Changed 2 months ago by jmathis

Bonjour,

Je viens de faire le test. Pas de problem à ce niveau la. Tu ne confond pas avec la catégorie de service ??

Changed 2 months ago by max511

  • version set to RC7

J'ai cette erreur dans les logs de centAcl

DB Error : DELETE FROM centreon_acl WHERE group_id = '18' [nativecode=1053 ** Server shutdown in progress]<br />PHP Fatal error: Call to undefined method DB_Error::fetchRow() in /usr/local/centreon/cron/centAcl.php on line 64

Ps: la table centreon_acl existe !

Changed 2 months ago by jmathis

tu as modifié le code ? ligne 64 ce n'est pas cette requète...

Changed 2 months ago by max511

Non je n'ai rien modifié

Changed 2 months ago by max511

Ligne 64 :

while ($res2 =& $DBRESULT2->fetchRow()){

Changed 2 months ago by jmathis

la ligne d'avant ?

Changed 2 months ago by max511

                $Host = array();
                62:$DBRESULT2 =& $pearDB->query("SELECT `acl_res_id` FROM `acl_res_group_relations` WHERE `acl_group_id` = '".$acl_group_id."'");
                //$time_start = microtime_float2();
                while ($res2 =& $DBRESULT2->fetchRow()){

Changed 2 months ago by max511

Désolé pour le 62, c'est une erreur de frappe de ma part en faisant le copier collr

Changed 2 months ago by jmathis

es tu sur que ton server marche bien ?

=> Server shutdown in progress

Changed 2 months ago by max511

Oui il marche cependant, il est vrai que j'ai fait un centcore stop et centstorage stop puis j'ai redémarrer les services. Je pensais que cette ligne avait quelque chose avoir avec mon problème...

En tout cas, j'ai toujours le même problème quand j'ajoute un servicegroups (pas une catégorie)

Changed 2 months ago by jmathis

je ne comprend vraiment pas. Le code ne peut renvoyer normalement cette erreur. Ce n'est pas la même requete.

je peux avoir la ligne 50 à 75 ?

Merci

Changed 2 months ago by max511

         /*
         * Purge datas
         */
        $strBegin = "INSERT INTO `centreon_acl` ( `host_name` , `service_description` , `group_id` ) VALUES ";

        foreach ($tabGroups as $acl_group_id => $acl_res_id){
                $tabElem = array();
                /*
                 * Delete old datas for this groups
                 */
                $DBRESULT =& $pearDBndo->query("DELETE FROM `centreon_acl` WHERE `group_id` = '".$acl_group_id."'");
                if (PEAR::isError($DBRESULT))
                        print "DB Error : ".$DBRESULT->getDebugInfo()."<br />";

                /*
                 * Select
                 */

                $Host = array();
                $DBRESULT2 =& $pearDB->query("SELECT `acl_res_id` FROM `acl_res_group_relations` WHERE `acl_group_id` = '".$acl_group_id."'");
                //$time_start = microtime_float2();
                while ($res2 =& $DBRESULT2->fetchRow()){

                        /* ------------------------------------------------------------------ */

                        /*
                         * Get all Hosts
                         */
                        $DBRESULT3 =& $pearDB->query("SELECT host_id, host_name FROM `host`, `acl_resources_host_relations` WHERE acl_res_id = '".$res2["acl_res_id"]."' AND acl_resources_host_relations.host_host_id = host.host_id AND host.host_register = '1' AND host.host_activate = '1'");
                        while ($h = $DBRESULT3->fetchRow())
                                $Host[$h["host_id"]] = $h["host_name"];

Changed 2 months ago by jmathis

et le fichier cette fois ci car je ne vois vraiment pas.

je vais le tester chez moi.

Merci.

Changed 2 months ago by max511

Changed 7 weeks ago by jmathis

Changed 7 weeks ago by jmathis

  • status changed from new to closed
  • resolution set to Fixed

je n'arrive pas du tout a reproduire le promblem de l'acL. Je pense qu'avec le fichier ca sera bon.

Changed 7 weeks ago by max511

  • status changed from closed to reopened
  • resolution deleted

J'ai toujours le problème

J'ai refait une installation from scratch et le résultat est exactement le même (en utilisant ou non le fichier que vous avez posté)

Changed 7 weeks ago by jmathis

j'ai testé et retesté et a aucun moment ce pb...

je peux avoir un acces à ce server ?

ou alors je te donne un acces à un server pour faire le test...

contact moi

=> jmathis@…

Changed 7 weeks ago by max511

  • version deleted

Même problème en RC8

Changed 7 weeks ago by max511

Avez-vous reçu mon email ?

Note: See TracTickets for help on using tickets.