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

@ -410,6 +410,15 @@ function execAdmin()
$GroupUtil=$GLOBALS["SYSTEM_MANAGER"]["GROUP"]->insertInstance($GroupUtil);
$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->setGroupId($GroupAdmin->getId());
$NodeGroupUserAdmin->setNodeId($Node->getId());
@ -613,6 +622,7 @@ function execAdmin()
$GLOBALS["SYSTEM_MANAGER"]["TREE_NODE_CACHE"]->emptyCache();
$GLOBALS["SYSTEM_MANAGER"]["LIST_USER_GROUP_CACHE"]->emptyCache();
$GLOBALS["SYSTEM_MANAGER"]["LIST_USER_NODE_CACHE"]->emptyCache();
if( DATA_ACCES_CACHE_PERMISSION )
$GLOBALS["SYSTEM_MANAGER"]["PERMISSION_CACHE"]->emptyCache();
#------------------------------------------------------------------------------------------------------------------------------------

View File

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

View File

@ -581,7 +581,9 @@ function exportAdmin()
$GLOBALS["SYSTEM_MANAGER"]["TREE_NODE_CACHE"]->emptyCache();
$GLOBALS["SYSTEM_MANAGER"]["LIST_USER_GROUP_CACHE"]->emptyCache();
$GLOBALS["SYSTEM_MANAGER"]["LIST_USER_NODE_CACHE"]->emptyCache();
if( DATA_ACCES_CACHE_PERMISSION )
$GLOBALS["SYSTEM_MANAGER"]["PERMISSION_CACHE"]->emptyCache();
systemRedirect(formatUrl($this->getId(),"AdminUser","ChangeUserAdmin","msgSave",$user_id));
return "";
}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
* @return tableau tableau d'objets de coordination
* @return tableau tableau d'objets du droit
*/
function getDefaultRight()
{
// var_dump($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 */
$currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();

View File

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

View File

@ -170,10 +170,11 @@ var $data = null;
*/
function deleteAllSystemCache()
{
$GLOBALS["SYSTEM_MANAGER"]["TREE_NODE_CACHE"]->EmptyCache();
$GLOBALS["SYSTEM_MANAGER"]["TREE_GROUP_CACHE"]->EmptyCache();
$GLOBALS["SYSTEM_MANAGER"]["PERMISSION_CACHE"]->EmptyCache();
$GLOBALS["SYSTEM_MANAGER"]["LIST_USER_GROUP_CACHE"]->EmptyCache();
$GLOBALS["SYSTEM_MANAGER"]["LIST_USER_NODE_CACHE"]->EmptyCache();
$GLOBALS["SYSTEM_MANAGER"]["TREE_NODE_CACHE"]->emptyCache();
$GLOBALS["SYSTEM_MANAGER"]["TREE_GROUP_CACHE"]->emptyCache();
if( DATA_ACCES_CACHE_PERMISSION )
$GLOBALS["SYSTEM_MANAGER"]["PERMISSION_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{
$tmp=$this->listUserNode->getConfiguredNodeId();
/* on prend le premier noeud */
// var_dump("tmp count: ".count($tmp));
if (count($tmp)==0)
{
/* retour ? une session par defaut */
/* retour à une session par defaut */
$this->defaultSession();
/* pas de noeuds configur?s pour l'utilisateur?! */
/* pas de noeuds configurés pour l'utilisateur?! */
$systemError=1;
addError($systemError, "User Session", "Utilisateur corrompu, pas de noeud configures", __line__, __file__);
return $GLOBALS["SYSTEM_DEFAULT_NODE"];