PDF via cronjob creates summary reports for all websites #3017

Closed
anonymous-piwik-user opened this Issue Mar 6, 2012 · 2 comments

2 participants

@anonymous-piwik-user

Sorry, cant reopen ticket #3006

"[...] an user created pdf report includes stats for all tracked websites, not only for the sites the user has the right to view the stats."

I reactivate the report plugin again and it doesnt work for me. Just get the full report for all websites when I reactivate the plugin. Created the report request as simple user, not as Super User.

Sorry, in my bug report yesterday I forgot to write, that the manual requested ist fine, only the Email by cronjob report includes all sites. Runs the Cron without additional parameter as Super User?

@mattab
Piwik Open Source Analytics member

Thank you for the report. I could verify, I will try to fix asap!

@mattab
Piwik Open Source Analytics member

(In [6085]) Fixes #3017
BUG explanation: During scheduled tasks, Super User status is enforced. This was not a problem until recently, because the Scheduled report was always about one website in particular. since we added All websites Refs #2600 now the report was generated as "Super User"....
so I force the getSitesWithAtLeastViewAccess in the SitesManager API to be restricted to the user who created the report..
This solution is unfortunately a bit hacky but I couldn't find a better way and it took me 4 hours to get it right... pff

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment