Skip to content

Commit

Permalink
exclude clone action for templates
Browse files Browse the repository at this point in the history
  • Loading branch information
cconard96 authored and trasher committed Sep 23, 2024
1 parent 7e07e18 commit 386d682
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/CommonDBTM.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
use Glpi\Application\View\TemplateRenderer;
use Glpi\Event;
use Glpi\Features\CacheableListInterface;
use Glpi\Features\Clonable;
use Glpi\Plugin\Hooks;
use Glpi\RichText\RichText;
use Glpi\RichText\UserMention;
Expand Down Expand Up @@ -4057,6 +4058,13 @@ public function getForbiddenSingleMassiveActions()
}
}

if (
Toolbox::hasTrait(static::class, Clonable::class)
&& $this->isTemplate()
) {
$excluded[] = '*:clone';
}

return $excluded;
}

Expand Down

0 comments on commit 386d682

Please sign in to comment.