Fixed an issue that blocked the editing of attributes in unpublished events if the MISP.unpublishedprivate setting was set

pull/1001/head
Iglocska 2016-03-01 15:58:00 +01:00
parent 4eba494008
commit d5c5ad0016
1 changed files with 1 additions and 1 deletions

View File

@ -1853,7 +1853,7 @@ class Attribute extends AppModel {
if (isset($options['conditions'])) $params['conditions']['AND'][] = $options['conditions'];
if (isset($options['order'])) $params['order'] = $options['order'];
if (isset($options['group'])) $params['group'] = $options['group'];
if (Configure::read('MISP.unpublishedprivate')) $params['conditions']['AND'][] = array('Event.published' => 1);
if (Configure::read('MISP.unpublishedprivate')) $params['conditions']['AND'][] = array('OR' => array('Event.published' => 1, 'Event.orgc_id' => $user['org_id']));
$results = $this->find('all', $params);
if (isset($options['withAttachments']) && $options['withAttachments']) {
foreach ($results as &$attribute) {