Deletion of objects:

- automatic delete of mandatory ext keys, and if the option is set in the data model (I've set the "manual" option by default, and the "auto" option for links)
- automatic reset of optional ext keys (several keys could be updated on one single object)
- takes into account the user rights
- security against the use of page arguments when the automatic deletion is not allowed
Known limitations:
- does not check that resetting an ext key could affect the lifecycle consistency (e.g. delete a workgroup referenced by a ticket)
- does not check recursively on the automatic deletion, which should not be a problem given the current data model (TBC)

SVN:trunk[181]
This commit is contained in:
Romain Quetiez
2009-09-18 16:12:38 +00:00
parent 0454e7fa78
commit 048406ab47
20 changed files with 415 additions and 131 deletions

View File

@@ -57,6 +57,13 @@ class DBObjectSet
return $sRet;
}
static public function FromObject($oObject)
{
$oRetSet = self::FromScratch(get_class($oObject));
$oRetSet->AddObject($oObject);
return $oRetSet;
}
static public function FromScratch($sClass)
{
$oFilter = new CMDBSearchFilter($sClass);