Hi there,
we’ve got Piwik 2.3.0 for our university in use and the various departments have their own Piwik ID. Overall, we have about 100 000 pageviews per day. Archiving of data is done via the cron job runs once per hour.
In the individual departments, there are users with normal privileges to view the statistics. These have so far also create segments. But which were generated at runtime what the performance is heavily loaded.
I have now set in the config “enable_create_realtime_segments = 0”.
Now normal user can’t create any segments anymore. That is very unfortunate.
Why do I need Admin rights to create segments that are archived by the cronjob?
Is it a problem if I change the code in "plugins/SegmentEditor/api.php in something like this?
protected function checkAutoArchive($autoArchive, $idSite)
{
$autoArchive = (int)$autoArchive;
if ($autoArchive) {
$exception = new Exception(“To prevent abuse, autoArchive=1 requires Super User or ControllerAdmin access.”);
if (empty($idSite)) {
if (!Piwik::hasUserSuperUserAccess()) {
throw $exception;
}
} /else {
if (!Piwik::isUserHasAdminAccess($idSite)) {
throw $exception;
}
}/
}
return $autoArchive;
}
Please excuse my English. I hope you understand what I mean.
Thank you in advance for your efforts.
I wish you a Merry Christmas and a Happy New Year.
Wesley