mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 07:12:26 +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;
|
||||
|
||||
@@ -38,7 +38,7 @@ class UI
|
||||
|
||||
$aDisplayParams = [
|
||||
'icon' => MetaModel::GetClassIcon($sClass, false),
|
||||
'title' => Dict::Format('UI:Modify_ObjectsOf_Class', $sClassName),
|
||||
'title' => Dict::Format($sTitleCode, $sClassName),
|
||||
];
|
||||
IssueLog::Error('OperationSelectForModifyAll');
|
||||
self::DisplayMultipleSelectionForm($oP, $oFilter, $sNextOperation, $oChecker, [], $aDisplayParams);
|
||||
|
||||
Reference in New Issue
Block a user