trustedManager = $trustedManager; } /** * @inheritdoc */ public function execute() { $tokenId = $this->getRequest()->getParam('id'); $userId = $this->getRequest()->getParam('user_id'); $this->trustedManager->revokeTrustedDevice($tokenId); $this->messageManager->addSuccessMessage(__('Device authorization revoked')); return $this->_redirect('adminhtml/user/edit', ['user_id' => $userId]); } /** * @inheritdoc */ protected function _isAllowed() { return parent::_isAllowed() && $this->_authorization->isAllowed('MSP_TwoFactorAuth::tfa'); } }