diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-02-17 02:21:41 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-02-17 02:21:41 +0400 |
commit | bf21210326aab3316b6e5cba8d9f2fb22042cf94 (patch) | |
tree | c1983081a208da15ea3a57c388275a61c1237e6f /plugins/SegmentEditor | |
parent | 1238ea35c8329c90180431f6f387f77e04d003f1 (diff) |
refs #4679 do not add any segments in case user does not have super user access
Diffstat (limited to 'plugins/SegmentEditor')
-rw-r--r-- | plugins/SegmentEditor/SegmentEditor.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/SegmentEditor/SegmentEditor.php b/plugins/SegmentEditor/SegmentEditor.php index 89c8ddc6de..2441e4d559 100644 --- a/plugins/SegmentEditor/SegmentEditor.php +++ b/plugins/SegmentEditor/SegmentEditor.php @@ -12,6 +12,7 @@ use Exception; use Piwik\Common; use Piwik\Db; use Piwik\DbHelper; +use Piwik\Piwik; use Piwik\Version; /** @@ -54,6 +55,10 @@ class SegmentEditor extends \Piwik\Plugin public function getKnownSegmentsToArchiveAllSites(&$segments) { + if (!Piwik::hasUserSuperUserAccess()) { + return; + } + $model = new Model(); $segmentsToAutoArchive = $model->getSegmentsToAutoArchive($idSite = false); @@ -64,6 +69,10 @@ class SegmentEditor extends \Piwik\Plugin public function getKnownSegmentsToArchiveForSite(&$segments, $idSite) { + if (!Piwik::hasUserSuperUserAccess()) { + return; + } + $model = new Model(); $segmentToAutoArchive = $model->getSegmentsToAutoArchive($idSite); |