mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-29 05:28:44 +02:00
Added "Allow delete Object" and "deny delete Object" when replica is deleted
This commit is contained in:
@@ -84,14 +84,20 @@ class SynchroReplicaController extends Controller
|
||||
$bResult = true;
|
||||
try {
|
||||
if (in_array($sOperation, ['unlink', 'unlinksynchro'])) {
|
||||
\IssueLog::Error('unlinking replica '.$oReplica->GetKey());
|
||||
$oReplica->UnLink();
|
||||
$oReplica->UnLink();
|
||||
}
|
||||
if (in_array($sOperation, ['synchro', 'unlinksynchro'])) {
|
||||
\IssueLog::Error('synchro replica '.$oReplica->GetKey());
|
||||
$oStatLog = $oReplica->ReSynchro();
|
||||
$aErrors = $oStatLog->GetTraces();
|
||||
}
|
||||
if ($sOperation == 'allowdelete') {
|
||||
$oReplica->Set('status_dest_creator', 1);
|
||||
$oReplica->DBUpdate();
|
||||
}
|
||||
if ($sOperation == 'denydelete') {
|
||||
$oReplica->Set('status_dest_creator', 0);
|
||||
$oReplica->DBUpdate();
|
||||
}
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$bResult = false;
|
||||
|
||||
Reference in New Issue
Block a user