Désolé... encore....

Moyo, j'ai testé ta modif, c'est presque niquel.

Problème restant , lors de l'appel :
checkSeveralRightsOr(array($_POST["type"]=>"w","contract_infocom"=>"w"));

Le premier paramètre est un type, le second un module...
La fonction attend uniquement des modules.
(donc comme j'ai pas les droits infocom, je me fait jeter)

Soit il faut une fonction checkSeveralTypeRightsOr
Soit tu ajoute l'autodétection type(numéric)/module(texte) dans la fonction

Proposition en P.J.

A+
--- /tmp/glpi-trunk-2007-09-16/inc/auth.function.php	2007-09-16 06:26:38.000000000 +0200
+++ auth.function.php	2007-09-16 08:16:42.000000000 +0200
@@ -264,9 +264,12 @@
 
 	$valid = false;
 	if (count($modules))
-		foreach ($modules as $mod => $right)
-			if (haveRight($mod, $right))
+		foreach ($modules as $mod => $right) {
+			if (is_numeric($mod) && haveTypeRight($mod,$right))
+				$valid = true;
+			else if (haveRight($mod, $right))
 				$valid = true;
+		}
 
 	if (!$valid) {
 		// Gestion timeout session
_______________________________________________
Glpi-dev mailing list
Glpi-dev@gna.org
https://mail.gna.org/listinfo/glpi-dev

Reply via email to