Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/site/app/controllers/statistics_controller.php
diff options
context:
space:
mode:
authorfligtar@gmail.com <fligtar@gmail.com@4eb1ac78-321c-0410-a911-ec516a8615a5>2008-04-02 02:27:26 (GMT)
committer fligtar@gmail.com <fligtar@gmail.com@4eb1ac78-321c-0410-a911-ec516a8615a5>2008-04-02 02:27:26 (GMT)
commit29adaddc94fdc7fc4867194929fa7a4a4eb7650c (patch)
treee0331248fd23fdd9d9ca188ce4afa0c51e8d8980 /site/app/controllers/statistics_controller.php
parent0f8b2c7de8ec3935e34d68d67e6ad54b1b08be01 (diff)
Fix stats csv error messages; bug 425724
git-svn-id: http://svn.mozilla.org/addons/trunk@11859 4eb1ac78-321c-0410-a911-ec516a8615a5
Diffstat (limited to 'site/app/controllers/statistics_controller.php')
-rw-r--r--site/app/controllers/statistics_controller.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/site/app/controllers/statistics_controller.php b/site/app/controllers/statistics_controller.php
index 6d90dde..69c9f61 100644
--- a/site/app/controllers/statistics_controller.php
+++ b/site/app/controllers/statistics_controller.php
@@ -263,8 +263,10 @@ class StatisticsController extends AppController
$addon = $this->Addon->find("Addon.id={$addon_id}", null, null, -1);
// Make sure user has permission to view this add-on's stats
- if (!$this->_checkAccess($addon_id, $addon))
+ if (!$this->_checkAccess($addon_id, $addon)) {
+ $this->Amo->accessDenied();
return;
+ }
$csv = $this->Stats->historicalPlot($addon_id, $plot);
@@ -355,6 +357,10 @@ class StatisticsController extends AppController
if ($addon['Addon']['publicstats'] == 1)
return true;
+ // If not publicstats, make sure logged in
+ if (!$this->Session->check('User'))
+ return false;
+
// If user can view any add-on's stats, allow access
if ($this->SimpleAcl->actionAllowed('Admin', 'ViewAnyStats', $this->Session->read('User')))
return true;