chg: [UI] Show warning when advanced auth keys are not enabled

pull/7443/head
Jakub Onderka 2021-05-25 14:09:55 +02:00
parent eadb89eec0
commit 8a00af12ba
2 changed files with 4 additions and 0 deletions

View File

@ -51,6 +51,7 @@ class AuthKeysController extends AppController
return $this->restResponsePayload;
}
$this->set('title_for_layout', __('Auth Keys'));
$this->set('advancedEnabled', !empty(Configure::read('Security.advanced_authkeys')));
$this->set('keyUsageEnabled', $keyUsageEnabled);
$this->set('menuData', [
'menuList' => $this->_isSiteAdmin() ? 'admin' : 'globalActions',

View File

@ -1,4 +1,7 @@
<?php
if (!$advancedEnabled) {
echo '<div class="alert">' . __('Advanced auth keys are not enabled.') . '</div>';
}
echo sprintf('<div%s>', empty($ajax) ? ' class="index"' : '');
echo $this->element('genericElements/IndexTable/index_table', [
'data' => [