Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2019-09-18 03:53:48 +0300
committerdiosmosis <diosmosis@users.noreply.github.com>2019-09-18 03:53:48 +0300
commit8b02bafc87275733b79f3189cd2962c4fbff64a0 (patch)
treeed122a949809f8eec8ebc17694a0a8e487a61c99 /plugins/Login
parent71f491aca60034396120fe47c1b3db0fa9fd894e (diff)
Show brute force menu item in admin only if enabled (#14798)
Only show menu item if brute force is enabled
Diffstat (limited to 'plugins/Login')
-rw-r--r--plugins/Login/Menu.php5
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);
+ }
}
}
}