mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 15:22:17 +02:00
Added "Allow delete Object" and "deny delete Object" when replica is deleted
This commit is contained in:
@@ -2851,6 +2851,22 @@ class SynchroReplica extends DBObject implements iDisplay
|
||||
'url' => $sUrl,
|
||||
'tooltip' => Dict::S('Class:SynchroReplica/Action:synchro+'),
|
||||
];
|
||||
|
||||
if ($this->Get('status_dest_creator') == 1) {
|
||||
$sUrl = "{$sRootUrl}synchro/replica.php?operation=denydelete&class=$sClass&id=$sId{$sContext}";
|
||||
$aActions['Class:SynchroReplica/Action:denydelete'] = [
|
||||
'label' => Dict::S('Class:SynchroReplica/Action:denydelete'),
|
||||
'url' => $sUrl,
|
||||
'tooltip' => Dict::S('Class:SynchroReplica/Action:denydelete+'),
|
||||
];
|
||||
} else {
|
||||
$sUrl = "{$sRootUrl}synchro/replica.php?operation=allowdelete&class=$sClass&id=$sId{$sContext}";
|
||||
$aActions['Class:SynchroReplica/Action:allowdelete'] = [
|
||||
'label' => Dict::S('Class:SynchroReplica/Action:allowdelete'),
|
||||
'url' => $sUrl,
|
||||
'tooltip' => Dict::S('Class:SynchroReplica/Action:allowdelete+'),
|
||||
];
|
||||
}
|
||||
}
|
||||
if (count($aActions) > 0) {
|
||||
$sRegularActionsMenuTogglerId = "ibo-regular-actions-menu-toggler-{$sId}";
|
||||
|
||||
Reference in New Issue
Block a user