diff --git a/app/Controller/Component/IOCExportComponent.php b/app/Controller/Component/IOCExportComponent.php index a9576ce6a..c056f0f1b 100644 --- a/app/Controller/Component/IOCExportComponent.php +++ b/app/Controller/Component/IOCExportComponent.php @@ -7,8 +7,10 @@ class IOCExportComponent extends Component { public function buildAll($event, $isSiteAdmin, $isMyEvent) { $temp = array(); if (!$isSiteAdmin) { - if ($event['Event']['distribution'] == 1 && !$isMyEvent && !isSiteAdmin) { + if (!$isMyEvent) { + if ($event['Event']['distribution'] == 0) { throw new Exception('Nothing to see here (not authorised)'); + } } } $this->__buildTop($event); diff --git a/app/Controller/EventsController.php b/app/Controller/EventsController.php index c32ce46db..c2b4779b5 100755 --- a/app/Controller/EventsController.php +++ b/app/Controller/EventsController.php @@ -2201,7 +2201,7 @@ class EventsController extends AppController { //$event['Attribute'] = $this->Whitelist->removeWhitelistedFromArray($event['Attribute'], false); // set up helper variables for the authorisation check in the component $isMyEvent = false; - if ($this->Auth->User == $event['Event']['org']) $isMyEvent = true; + if ($this->Auth->User('org') == $event['Event']['org']) $isMyEvent = true; $isSiteAdmin = $this->_isSiteAdmin(); // send the event and the vars needed to check authorisation to the Component