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
path: root/config
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@gmail.com>2015-12-10 03:47:03 +0300
committermattab <matthieu.aubry@gmail.com>2015-12-21 12:11:33 +0300
commit69bc09673c96ac6317df541df12e86584aaa1761 (patch)
tree8fa2246957a18b7b2e0f1ea4c226cebbc1c6570b /config
parent401489f1056119ae4c74b35f2c5040d60e800714 (diff)
fixes #4314 Don't let "admin" users see all other users in Piwik
Diffstat (limited to 'config')
-rw-r--r--config/environment/test.php11
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;