diff options
author | Marc Neudert <marc.neudert@gmail.com> | 2017-07-17 21:32:04 +0300 |
---|---|---|
committer | Stefan Giehl <stefan@piwik.org> | 2017-07-17 21:32:04 +0300 |
commit | 548428b1a0ff5875ac44d91a6b03501f3ec5d01d (patch) | |
tree | ab6e478e72ab0b823ad77f44cc2bcb55f03f90e2 /plugins/SitesManager/Controller.php | |
parent | b0546878bd83d5ca36d43a8db8ac903d8548dec1 (diff) |
hides "invalid site" error from non-super-users (#11870)
Diffstat (limited to 'plugins/SitesManager/Controller.php')
-rw-r--r-- | plugins/SitesManager/Controller.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/SitesManager/Controller.php b/plugins/SitesManager/Controller.php index 91744e84b2..2bf49e6f5c 100644 --- a/plugins/SitesManager/Controller.php +++ b/plugins/SitesManager/Controller.php @@ -148,8 +148,11 @@ class Controller extends \Piwik\Plugin\ControllerAdmin $javascriptGenerator = new TrackerCodeGenerator(); $piwikUrl = Url::getCurrentUrlWithoutFileName(); - if (!$this->site) { + if (!$this->site && Piwik::hasUserSuperUserAccess()) { throw new UnexpectedWebsiteFoundException('Invalid site ' . $this->idSite); + } elseif (!$this->site) { + // redirect to login form + Piwik::checkUserHasViewAccess($this->idSite); } return $this->renderTemplate('siteWithoutData', array( |