fix: [attribute index] fixed attribute tag widget

- notice errors due to missing variables in the closure
pull/7842/head
iglocska 2021-10-12 16:12:15 +02:00
parent c7493a5e0d
commit cb20a9e1d9
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
2 changed files with 3 additions and 3 deletions

View File

@ -254,7 +254,7 @@ echo $this->element('/genericElements/IndexTable/index_table', [
'title' => __('Soft delete attribute'),
'requirement' => $isSiteAdmin,
'complex_requirement' => [
'function' => function ($object, $isSiteAdmin, $me) {
'function' => function ($object) use ($isSiteAdmin, $me) {
return (
(
$isSiteAdmin ||
@ -272,7 +272,7 @@ echo $this->element('/genericElements/IndexTable/index_table', [
'title' => __('Permanently delete attribute'),
'requirement' => $isSiteAdmin,
'complex_requirement' => [
'function' => function ($object, $isSiteAdmin, $me) {
'function' => function ($object) use ($isSiteAdmin, $me) {
return (
(
$isSiteAdmin ||

View File

@ -14,7 +14,7 @@ $objectId = intval($attribute['id']);
'attributeId' => $attribute['id'],
'tags' => $attribute['AttributeTag'],
'tagAccess' => ($isSiteAdmin || $mayModify),
'localTagAccess' => ($isSiteAdmin || $mayModify || $me['org_id'] == $event['Event']['org_id'] || (int)$me['org_id'] === Configure::read('MISP.host_org_id')),
'localTagAccess' => ($isSiteAdmin || $mayModify || $me['org_id'] == $event['org_id'] || (int)$me['org_id'] === Configure::read('MISP.host_org_id')),
'context' => 'event',
'scope' => 'attribute',
'tagConflicts' => isset($attribute['tagConflicts']) ? $attribute['tagConflicts'] : array()