mirror of https://github.com/MISP/MISP
Merge pull request #199 from Xen0ph0n/patch-3
Issue Exporting Events as IOC's when not SiteAdmin2.1
commit
05e720f972
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue