fix: [tagCollection:view] Do not show `add LOCAL galaxy` button anymore

pull/4915/head
mokaddem 2019-07-19 15:37:20 +02:00
parent e50f624894
commit d99e2d8d39
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
4 changed files with 11 additions and 4 deletions

View File

@ -25,7 +25,8 @@
'isAclTagger' => true,
'data' => $item['Galaxy'],
'target_id' => h($item['TagCollection']['id']),
'target_type' => 'tag_collection'
'target_type' => 'tag_collection',
'local_tag_off' => true,
));
?>
</td>

View File

@ -26,7 +26,7 @@
$addTagButton = '&nbsp;';
if ($full) {
$addTagButton = sprintf(
'<button id="addTagButton" class="btn btn-inverse noPrint" style="line-height:10px; padding: 4px 4px;" onClick="popoverPopup(this, %s);">+</button>',
'<button id="addTagButton" class="btn btn-inverse noPrint" style="line-height:10px; padding: 2px;" onClick="popoverPopup(this, %s);"><i class="fas fa-globe-americas"></i> +</button>',
sprintf("'%s/tag_collection', 'tags', 'selectTaxonomy'", h($tagCollection['TagCollection']['id']))
);
}

View File

@ -127,7 +127,10 @@
'<i class="fas fa-globe-americas"></i> +'
);
}
if ($isSiteAdmin || ($isAclTagger && Configure::read('MISP.host_org_id') == $me['org_id'])) {
if ($isSiteAdmin || (
isset($local_tag_off) && !$local_tag_off &&
$isAclTagger && Configure::read('MISP.host_org_id') == $me['org_id'])
) {
echo sprintf(
'<button class="%s" data-target-type="%s" data-target-id="%s" data-local="true" role="button" tabindex="0" aria-label="' . __('Add new local cluster') . '" title="' . __('Add a local tag') . '" style="%s">%s</button>',
'useCursorPointer btn btn-inverse addGalaxy',

View File

@ -120,7 +120,10 @@
'<i class="fas fa-globe-americas"></i> +'
);
}
if ($isSiteAdmin || ($isAclTagger && Configure::read('MISP.host_org_id') == $me['org_id'])) {
if ($isSiteAdmin || (
isset($local_tag_off) && !$local_tag_off &&
$isAclTagger && Configure::read('MISP.host_org_id') == $me['org_id'])
) {
echo sprintf(
'<button class="%s" data-target-type="%s" data-target-id="%s" data-local="true" role="button" tabindex="0" aria-label="' . __('Add new local cluster') . '" title="' . __('Add a local tag') . '" style="%s">%s</button>',
'useCursorPointer btn btn-inverse addGalaxy',