Skip to content

Commit f87179b

Browse files
committed
Specific ACL for the customer invalidate tokens (force sign-in) admin action
1 parent 4dee7d2 commit f87179b

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

app/code/Magento/Customer/Block/Adminhtml/Edit/InvalidateTokenButton.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public function getButtonData()
2727
'class' => 'invalidate-token',
2828
'on_click' => 'deleteConfirm("' . $deleteConfirmMsg . '", "' . $this->getInvalidateTokenUrl() . '")',
2929
'sort_order' => 65,
30+
'aclResource' => 'Magento_Customer::invalidate_tokens',
3031
];
3132
}
3233
return $data;

app/code/Magento/Customer/Controller/Adminhtml/Customer/InvalidateToken.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@
2727
*/
2828
class InvalidateToken extends \Magento\Customer\Controller\Adminhtml\Index
2929
{
30+
/**
31+
* Authorization level of a basic admin session
32+
*
33+
* @see _isAllowed()
34+
*/
35+
const ADMIN_RESOURCE = 'Magento_Customer::invalidate_tokens';
36+
3037
/**
3138
* @var CustomerTokenServiceInterface
3239
*/

app/code/Magento/Customer/etc/acl.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<resource id="Magento_Customer::actions" title="Actions" translate="title" sortOrder="10">
1515
<resource id="Magento_Customer::delete" title="Delete" translate="title" sortOrder="10" />
1616
<resource id="Magento_Customer::reset_password" title="Reset password" translate="title" sortOrder="20" />
17+
<resource id="Magento_Customer::invalidate_tokens" title="Invalidate tokens" translate="title" sortOrder="30" />
1718
</resource>
1819
</resource>
1920
<resource id="Magento_Customer::online" title="Now Online" translate="title" sortOrder="20" />

0 commit comments

Comments
 (0)