fix: [internal] Remove redundant condition

pull/7956/head
Jakub Onderka 2021-11-16 02:49:35 +01:00
parent 3fd029cc62
commit b081dda00e
1 changed files with 0 additions and 4 deletions

View File

@ -2171,10 +2171,6 @@ class Attribute extends AppModel
if (isset($options['group'])) {
$params['group'] = !empty($options['group']) ? $options['group'] : false;
}
// Site admin can access even unpublished event attributes if `unpublishedprivate` option is enabled
if (!$user['Role']['perm_site_admin'] && Configure::read('MISP.unpublishedprivate')) {
$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'])) {
return $this->find('column', [