chg: [feed:attachFeedCorrelations] Added comment

feature/server-correlation-visibility-option
Sami Mokaddem 2023-12-07 09:42:36 +01:00
parent a4c473da83
commit 7c578f6c8e
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 5 additions and 2 deletions

View File

@ -590,8 +590,11 @@ class Feed extends AppModel
// Append also exact MISP feed or server event UUID
// TODO: This can be optimised in future to do that in one pass
if ($sourceHasHit && ($scope === 'Server' || $source[$scope]['source_format'] === 'misp')) {
if (!$user['Role']['perm_site_admin'] && $user['org_id'] != Configure::read('MISP.host_org_id')) {
continue;
if (
$scope === 'Server' &&
!$user['Role']['perm_site_admin'] && $user['org_id'] != Configure::read('MISP.host_org_id')
) {
continue; // Non-privileged users cannot see the hits for server
}
$pipe = $redis->pipeline();
$eventUuidHitPosition = [];