diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2019-09-18 03:53:48 +0300 |
---|---|---|
committer | diosmosis <diosmosis@users.noreply.github.com> | 2019-09-18 03:53:48 +0300 |
commit | 8b02bafc87275733b79f3189cd2962c4fbff64a0 (patch) | |
tree | ed122a949809f8eec8ebc17694a0a8e487a61c99 | |
parent | 71f491aca60034396120fe47c1b3db0fa9fd894e (diff) |
Show brute force menu item in admin only if enabled (#14798)
Only show menu item if brute force is enabled
-rw-r--r-- | plugins/Login/Menu.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/Login/Menu.php b/plugins/Login/Menu.php index 82976c83c4..8d8e37f14e 100644 --- a/plugins/Login/Menu.php +++ b/plugins/Login/Menu.php @@ -17,7 +17,10 @@ class Menu extends \Piwik\Plugin\Menu public function configureAdminMenu(MenuAdmin $menu) { if (Piwik::hasUserSuperUserAccess()) { - $menu->addDiagnosticItem('Login_BruteForceLog', $this->urlForAction('bruteForceLog'), $orderId = 30); + $systemSettings = new SystemSettings(); + if ($systemSettings->enableBruteForceDetection->getValue()) { + $menu->addDiagnosticItem('Login_BruteForceLog', $this->urlForAction('bruteForceLog'), $orderId = 30); + } } } } |