MISP/MISP — pull request #199 by Xen0ph0n (2013-12-19 19:36:50+00:00)
Title: Issue Exporting Events as IOC's when not SiteAdmin

When not site admin there was a syntax error stemming from !isSiteAdmin in in IOCexportComponent.php (missing $). I removed it totally as it was established in the surrounding IF statement on line 9.

There was still an issue exporting IOC's from events owned by the user in question (who was a member / admin of the organization who either published or the event was shared with)

Chased it down to be an errant comparison in EventsController.php (key was not defined so $isMyEvent was always False).

With proper ownership defined in $isMyEvent I restructured the check after it is determined one isn't a site admin, to ensure that you can export IOC's for events owned by your organization, AND export them from any events shared with you from other orgs (Distro > 0 where you arn't a member of the owner org)

Checked devlop and same typo was there so I think this is still a valid issue :+1: