mirror of https://github.com/MISP/MISP
fix: Enforce the hide tag directive
parent
bca4f0dec9
commit
d60b0cdaf2
|
@ -466,9 +466,7 @@ class TagsController extends AppController {
|
|||
}
|
||||
} else if ($taxonomy_id === 'all') {
|
||||
$conditions = array('Tag.org_id' => array(0, $this->Auth->user('org_id')));
|
||||
if (Configure::read('MISP.incoming_tags_disabled_by_default')) {
|
||||
$conditions['Tag.hide_tag'] = 0;
|
||||
}
|
||||
$options = $this->Tag->find('list', array('fields' => array('Tag.name'), 'conditions' => $conditions));
|
||||
$expanded = $options;
|
||||
} else {
|
||||
|
@ -499,6 +497,14 @@ class TagsController extends AppController {
|
|||
unset($expanded[$banned_tag]);
|
||||
}
|
||||
}
|
||||
$hidden_tags = $this->Tag->find('list', array(
|
||||
'conditions' => array('Tag.hide_tag' => 1),
|
||||
'fields' => array('Tag.id')
|
||||
));
|
||||
foreach ($hidden_tags as $hidden_tag) {
|
||||
unset($options[$hidden_tag]);
|
||||
unset($expanded[$hidden_tag]);
|
||||
}
|
||||
if ($attributeTag !== false) {
|
||||
$this->set('attributeTag', true);
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit bbf6716c734046e033bb51a1ea4763f9dc75408b
|
||||
Subproject commit 3595d04b35711461d3be5a495e77b2b8844ddb90
|
Loading…
Reference in New Issue