diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-12-10 03:47:03 +0300 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2015-12-21 12:11:33 +0300 |
commit | 69bc09673c96ac6317df541df12e86584aaa1761 (patch) | |
tree | 8fa2246957a18b7b2e0f1ea4c226cebbc1c6570b /config/environment | |
parent | 401489f1056119ae4c74b35f2c5040d60e800714 (diff) |
fixes #4314 Don't let "admin" users see all other users in Piwik
Diffstat (limited to 'config/environment')
-rw-r--r-- | config/environment/test.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/config/environment/test.php b/config/environment/test.php index 8174e8b057..702bebaef0 100644 --- a/config/environment/test.php +++ b/config/environment/test.php @@ -40,9 +40,16 @@ return array( 'Piwik\Access' => DI\decorate(function ($previous, ContainerInterface $c) { $testUseMockAuth = $c->get('test.vars.testUseMockAuth'); if ($testUseMockAuth) { + $idSitesAdmin = $c->get('test.vars.idSitesAdminAccess'); $access = new FakeAccess(); - FakeAccess::$superUser = true; - FakeAccess::$superUserLogin = 'superUserLogin'; + if (!empty($idSitesAdmin)) { + FakeAccess::$superUser = false; + FakeAccess::$idSitesAdmin = $idSitesAdmin; + FakeAccess::$identity = 'adminUserLogin'; + } else { + FakeAccess::$superUser = true; + FakeAccess::$superUserLogin = 'superUserLogin'; + } return $access; } else { return $previous; |