Skip to content

Commit eb832a2

Browse files
committed
MAGETWO-55849: Customer can be deleted without Merchant permissions verification
1 parent 3237879 commit eb832a2

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

app/code/Magento/User/view/adminhtml/templates/user/roles_grid_js.phtml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,17 @@ require([
7272

7373
});
7474
</script>
75-
<script type="text/x-magento-init">
76-
{
77-
"[data-role=delete-user]" : {
78-
"deleteUserAccount" : {
79-
"message": "<?php echo $editBlock->escapeHtml($editBlock->getDeleteMessage()) ?>",
80-
"url": "<?php /* @noEscape */ echo $editBlock->getDeleteUrl(); ?>",
81-
"objId": "<?php echo $editBlock->escapeHtml($editBlock->getObjectId()) ?>"
75+
76+
<?php if (is_object($editBlock)): ?>
77+
<script type="text/x-magento-init">
78+
{
79+
"[data-role=delete-user]" : {
80+
"deleteUserAccount" : {
81+
"message": "<?php echo $editBlock->escapeHtml($editBlock->getDeleteMessage()) ?>",
82+
"url": "<?php /* @noEscape */ echo $editBlock->getDeleteUrl(); ?>",
83+
"objId": "<?php echo $editBlock->escapeHtml($editBlock->getObjectId()) ?>"
84+
}
8285
}
8386
}
84-
}
85-
</script>
87+
</script>
88+
<?php endif; ?>

0 commit comments

Comments
 (0)