fix: check also event.org_id when validating event ownership in order to fetch attributes

Fixes #1918
pull/3995/head
Patrizio Tufarolo 2019-01-08 12:47:45 +01:00 committed by Patrizio Tufarolo
parent b253303edc
commit 32962184fa
1 changed files with 1 additions and 1 deletions

View File

@ -2898,7 +2898,7 @@ class Attribute extends AppModel
$params['group'] = empty($options['group']) ? $options['group'] : false;
}
if (Configure::read('MISP.unpublishedprivate')) {
$params['conditions']['AND'][] = array('OR' => array('Event.published' => 1, 'Event.orgc_id' => $user['org_id']));
$params['conditions']['AND'][] = array('OR' => array('Event.published' => 1, 'Event.orgc_id' => $user['org_id'], 'Event.org_id' => $user['org_id']));
}
if (!empty($options['list'])) {
if (!empty($options['event_ids'])) {