Skip to content
Snippets Groups Projects

use route access check for node operation

+ 3
2
@@ -36,8 +36,9 @@ function quick_node_clone_entity_operation(EntityInterface $entity) {
return $operations;
}
if (!_quick_node_clone_has_clone_permission($entity)) {
return $operations;
$url = Url::fromRoute('quick_node_clone.node.quick_clone', ['node' => $entity->id()]);
if (!$url->access()) {
return [];
}
$operations['quick_clone'] = [
Loading