Propagation of #47 fix

This commit is contained in:
Rooty 2021-04-01 18:02:05 +02:00
parent 64b9725f50
commit 38410147c7
7 changed files with 35 additions and 18 deletions

View File

@ -409,6 +409,15 @@ function execAdmin()
$NodeAdmin=$GLOBALS["SYSTEM_MANAGER"]["NODE"]->insertInstance($NodeAdmin); $NodeAdmin=$GLOBALS["SYSTEM_MANAGER"]["NODE"]->insertInstance($NodeAdmin);
$GroupUtil=$GLOBALS["SYSTEM_MANAGER"]["GROUP"]->insertInstance($GroupUtil); $GroupUtil=$GLOBALS["SYSTEM_MANAGER"]["GROUP"]->insertInstance($GroupUtil);
$GroupAdmin=$GLOBALS["SYSTEM_MANAGER"]["GROUP"]->insertInstance($GroupAdmin); $GroupAdmin=$GLOBALS["SYSTEM_MANAGER"]["GROUP"]->insertInstance($GroupAdmin);
if( $Node->getHasPublic() )
{
$NodePublic =new Node();
$NodePublic->setIdPere($Node->getId());
$NodePublic->setTemplate($defaultTemplate);
$NodePublic->setLibelle("FR", $Node->getDomain);
$NodePublic=$GLOBALS["SYSTEM_MANAGER"]["NODE"]->insertInstance($NodePublic);
}
$NodeGroupUserAdmin =new NodeGroupUser(); $NodeGroupUserAdmin =new NodeGroupUser();
$NodeGroupUserAdmin->setGroupId($GroupAdmin->getId()); $NodeGroupUserAdmin->setGroupId($GroupAdmin->getId());
@ -613,7 +622,8 @@ function execAdmin()
$GLOBALS["SYSTEM_MANAGER"]["TREE_NODE_CACHE"]->emptyCache(); $GLOBALS["SYSTEM_MANAGER"]["TREE_NODE_CACHE"]->emptyCache();
$GLOBALS["SYSTEM_MANAGER"]["LIST_USER_GROUP_CACHE"]->emptyCache(); $GLOBALS["SYSTEM_MANAGER"]["LIST_USER_GROUP_CACHE"]->emptyCache();
$GLOBALS["SYSTEM_MANAGER"]["LIST_USER_NODE_CACHE"]->emptyCache(); $GLOBALS["SYSTEM_MANAGER"]["LIST_USER_NODE_CACHE"]->emptyCache();
$GLOBALS["SYSTEM_MANAGER"]["PERMISSION_CACHE"]->emptyCache(); if( DATA_ACCES_CACHE_PERMISSION )
$GLOBALS["SYSTEM_MANAGER"]["PERMISSION_CACHE"]->emptyCache();
#------------------------------------------------------------------------------------------------------------------------------------ #------------------------------------------------------------------------------------------------------------------------------------
# Redirection vers le formulaire # Redirection vers le formulaire

View File

@ -526,7 +526,9 @@ Class AdminNode extends CoordinationObj
$GLOBALS["SYSTEM_MANAGER"]["TREE_NODE_CACHE"]->emptyCache(); $GLOBALS["SYSTEM_MANAGER"]["TREE_NODE_CACHE"]->emptyCache();
$GLOBALS["SYSTEM_MANAGER"]["LIST_USER_GROUP_CACHE"]->emptyCache(); $GLOBALS["SYSTEM_MANAGER"]["LIST_USER_GROUP_CACHE"]->emptyCache();
$GLOBALS["SYSTEM_MANAGER"]["LIST_USER_NODE_CACHE"]->emptyCache(); $GLOBALS["SYSTEM_MANAGER"]["LIST_USER_NODE_CACHE"]->emptyCache();
$GLOBALS["SYSTEM_MANAGER"]["PERMISSION_CACHE"]->emptyCache(); if( DATA_ACCES_CACHE_PERMISSION )
$GLOBALS["SYSTEM_MANAGER"]["PERMISSION_CACHE"]->emptyCache();
systemRedirect( formatUrl($this->getId(), "AdminNode", "updateAdmin", "msgSave")."&node_Id1=".$Node->getId() ); systemRedirect( formatUrl($this->getId(), "AdminNode", "updateAdmin", "msgSave")."&node_Id1=".$Node->getId() );
return "msgSave"; return "msgSave";
}else{ }else{

View File

@ -581,7 +581,9 @@ function exportAdmin()
$GLOBALS["SYSTEM_MANAGER"]["TREE_NODE_CACHE"]->emptyCache(); $GLOBALS["SYSTEM_MANAGER"]["TREE_NODE_CACHE"]->emptyCache();
$GLOBALS["SYSTEM_MANAGER"]["LIST_USER_GROUP_CACHE"]->emptyCache(); $GLOBALS["SYSTEM_MANAGER"]["LIST_USER_GROUP_CACHE"]->emptyCache();
$GLOBALS["SYSTEM_MANAGER"]["LIST_USER_NODE_CACHE"]->emptyCache(); $GLOBALS["SYSTEM_MANAGER"]["LIST_USER_NODE_CACHE"]->emptyCache();
$GLOBALS["SYSTEM_MANAGER"]["PERMISSION_CACHE"]->emptyCache(); if( DATA_ACCES_CACHE_PERMISSION )
$GLOBALS["SYSTEM_MANAGER"]["PERMISSION_CACHE"]->emptyCache();
systemRedirect(formatUrl($this->getId(),"AdminUser","ChangeUserAdmin","msgSave",$user_id)); systemRedirect(formatUrl($this->getId(),"AdminUser","ChangeUserAdmin","msgSave",$user_id));
return ""; return "";
}else{ }else{

View File

@ -1264,16 +1264,14 @@ var $currentCoordinationObject=null;
} }
/** /**
* getListObjectForNavigation : renvoi tous les objets d'un noeud * getDefaultRight : renvoi le droit par défaut
* @access public * @access public
* @return tableau tableau d'objets de coordination * @return tableau tableau d'objets du droit
*/ */
function getDefaultRight() function getDefaultRight()
{ {
// var_dump($GLOBALS["SYSTEM_USER_SESSION"]->navigationNodeId); // var_dump($GLOBALS["SYSTEM_USER_SESSION"]->navigationNodeId);
$tabObject=$this->getListObjectForNavigation( $GLOBALS["SYSTEM_USER_SESSION"]->navigationNodeId ); $tabObject=$this->getListObjectForNavigation( $GLOBALS["SYSTEM_USER_SESSION"]->navigationNodeId );
// $tabObject=$this->getListObjectForNavigation( 104 );
// var_dump($tabObject);
/* gestion du lib en fonction de la langue courante */ /* gestion du lib en fonction de la langue courante */
$currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode(); $currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();

View File

@ -859,7 +859,7 @@ var $archivage= null;
// Suppression de la cache // Suppression de la cache
if( DATA_ACCES_CACHE_PERMISSION ) if( DATA_ACCES_CACHE_PERMISSION )
$GLOBALS["SYSTEM_MANAGER"]["PERMISSION_CACHE"]->EmptyCache(); $GLOBALS["SYSTEM_MANAGER"]["PERMISSION_CACHE"]->emptyCache();
return "msgSave"; return "msgSave";
}else{ }else{
@ -897,7 +897,8 @@ var $archivage= null;
//Maj //Maj
$RightToUpdate=$GLOBALS["SYSTEM_MANAGER"]["RIGHT"]->saveInstance($RightToUpdate); $RightToUpdate=$GLOBALS["SYSTEM_MANAGER"]["RIGHT"]->saveInstance($RightToUpdate);
//Suppression de la cache //Suppression de la cache
$GLOBALS["SYSTEM_MANAGER"]["PERMISSION_CACHE"]->EmptyCache(); if( DATA_ACCES_CACHE_PERMISSION )
$GLOBALS["SYSTEM_MANAGER"]["PERMISSION_CACHE"]->emptyCache();
return "msgUpdated"; return "msgUpdated";
}else{ }else{
return "wrongArgument"; return "wrongArgument";
@ -921,7 +922,7 @@ var $archivage= null;
$RightToDelete=$GLOBALS["SYSTEM_MANAGER"]["RIGHT"]->deleteInstance($RightToDelete); $RightToDelete=$GLOBALS["SYSTEM_MANAGER"]["RIGHT"]->deleteInstance($RightToDelete);
//Suppression de la cache //Suppression de la cache
if( DATA_ACCES_CACHE_PERMISSION ) if( DATA_ACCES_CACHE_PERMISSION )
$GLOBALS["SYSTEM_MANAGER"]["PERMISSION_CACHE"]->EmptyCache(); $GLOBALS["SYSTEM_MANAGER"]["PERMISSION_CACHE"]->emptyCache();
return "msgDelete"; return "msgDelete";
}else{ }else{
@ -944,7 +945,9 @@ var $archivage= null;
$GLOBALS["SYSTEM_MANAGER"]["RIGHT"]->deleteInstance($tabRight[$i]); $GLOBALS["SYSTEM_MANAGER"]["RIGHT"]->deleteInstance($tabRight[$i]);
} }
// Suppression de la cache // Suppression de la cache
$GLOBALS["SYSTEM_MANAGER"]["PERMISSION_CACHE"]->EmptyCache(); if( DATA_ACCES_CACHE_PERMISSION )
$GLOBALS["SYSTEM_MANAGER"]["PERMISSION_CACHE"]->emptyCache();
return true; return true;
} }

View File

@ -170,10 +170,11 @@ var $data = null;
*/ */
function deleteAllSystemCache() function deleteAllSystemCache()
{ {
$GLOBALS["SYSTEM_MANAGER"]["TREE_NODE_CACHE"]->EmptyCache(); $GLOBALS["SYSTEM_MANAGER"]["TREE_NODE_CACHE"]->emptyCache();
$GLOBALS["SYSTEM_MANAGER"]["TREE_GROUP_CACHE"]->EmptyCache(); $GLOBALS["SYSTEM_MANAGER"]["TREE_GROUP_CACHE"]->emptyCache();
$GLOBALS["SYSTEM_MANAGER"]["PERMISSION_CACHE"]->EmptyCache(); if( DATA_ACCES_CACHE_PERMISSION )
$GLOBALS["SYSTEM_MANAGER"]["LIST_USER_GROUP_CACHE"]->EmptyCache(); $GLOBALS["SYSTEM_MANAGER"]["PERMISSION_CACHE"]->emptyCache();
$GLOBALS["SYSTEM_MANAGER"]["LIST_USER_NODE_CACHE"]->EmptyCache(); $GLOBALS["SYSTEM_MANAGER"]["LIST_USER_GROUP_CACHE"]->emptyCache();
$GLOBALS["SYSTEM_MANAGER"]["LIST_USER_NODE_CACHE"]->emptyCache();
} }
?> ?>

View File

@ -238,11 +238,12 @@ var $permission;
}else{ }else{
$tmp=$this->listUserNode->getConfiguredNodeId(); $tmp=$this->listUserNode->getConfiguredNodeId();
/* on prend le premier noeud */ /* on prend le premier noeud */
// var_dump("tmp count: ".count($tmp));
if (count($tmp)==0) if (count($tmp)==0)
{ {
/* retour ? une session par defaut */ /* retour à une session par defaut */
$this->defaultSession(); $this->defaultSession();
/* pas de noeuds configur?s pour l'utilisateur?! */ /* pas de noeuds configurés pour l'utilisateur?! */
$systemError=1; $systemError=1;
addError($systemError, "User Session", "Utilisateur corrompu, pas de noeud configures", __line__, __file__); addError($systemError, "User Session", "Utilisateur corrompu, pas de noeud configures", __line__, __file__);
return $GLOBALS["SYSTEM_DEFAULT_NODE"]; return $GLOBALS["SYSTEM_DEFAULT_NODE"];