Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 97fac9f

Browse files
author
Volodymyr Kublytskyi
committed
MAGETWO-85314: Add more granular ACL control over cache management in admin panel magento-partners/magento2ce#78
- fixed block arguments issue - fixed code style
1 parent 767305a commit 97fac9f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

app/code/Magento/Backend/Block/Cache.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ protected function _construct()
4545
]
4646
);
4747
}
48-
4948
}
5049

5150
/**

app/code/Magento/Backend/Block/Cache/Permissions.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
namespace Magento\Backend\Block\Cache;
88

99
use Magento\Framework\AuthorizationInterface;
10+
use Magento\Framework\View\Element\Block\ArgumentInterface;
1011

1112
/**
1213
* Class Permissions
1314
*/
14-
class Permissions
15+
class Permissions implements ArgumentInterface
1516
{
1617
/**
1718
* @var AuthorizationInterface

app/code/Magento/Backend/view/adminhtml/templates/system/cache/additional.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
// @codingStandardsIgnoreFile
88

9-
/** @var \Magento\Backend\Block\Cache\Permissions $permissions */
9+
/** @var \Magento\Backend\Block\Cache\Permissions|null $permissions */
1010
$permissions = $block->getData('permissions');
1111
?>
12-
<?php if ($block->hasAccessToAdditionalActions()): ?>
12+
<?php if ($permissions && $permissions->hasAccessToAdditionalActions()): ?>
1313
<div class="additional-cache-management">
1414
<?php if ($permissions->hasAccessToFlushCatalogImages()): ?>
1515
<h2>

0 commit comments

Comments
 (0)