mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-19 08:38:45 +02:00
Automatically add an id on the user rights profile/actions to allow a finer granularity for the deltas.
SVN:trunk[3305]
This commit is contained in:
@@ -442,6 +442,17 @@ class ModelFactory
|
||||
}
|
||||
}
|
||||
|
||||
// Adjust the XML to transparently add an id (=type:<type>) on all allowed actions (profiles)
|
||||
// which don't already have one
|
||||
$oNodeList = $oXPath->query('/itop_design/user_rights/profiles/profile/groups/group/actions/action');
|
||||
foreach($oNodeList as $oNode)
|
||||
{
|
||||
if ($oNode->getAttribute('id') == '')
|
||||
{
|
||||
$oNode->SetAttribute('id', 'type:'.$oNode->getAttribute('xsi:type'));
|
||||
}
|
||||
}
|
||||
|
||||
$oDeltaRoot = $oDocument->childNodes->item(0);
|
||||
$this->LoadDelta($oDocument, $oDeltaRoot, $this->oDOMDocument);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user