chg: [sharinggroup] Allow pushing SG if remote internal server is not in the list of SG servers

pull/7469/head
mokaddem 2021-06-04 08:34:47 +02:00
parent c9acae11f0
commit 0a68e339e8
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
2 changed files with 15 additions and 2 deletions

View File

@ -1012,7 +1012,20 @@ class Event extends AppModel
}
}
if (!$found) {
return 403;
if (!$server['Server']['internal']) {
return 403;
} else { // Consider the internal server to be part of the SharingGroupServer list if one of the remote org belong to the SharingGroupOrg list
if (isset($event['SharingGroup']['SharingGroupOrg'])) {
foreach ($event['SharingGroup']['SharingGroupOrg'] as $org) {
if (isset($org['Organisation']) && $org['Organisation']['uuid'] === $server['RemoteOrg']['uuid']) {
$found = true;
}
}
}
if (!$found) {
return 403;
}
}
}
} else if (empty($event['SharingGroup']['roaming'])) {
return 403;

View File

@ -533,7 +533,7 @@ class SharingGroup extends AppModel
}
}
}
if ($conditional === false) {
if ($conditional === false && !$server['Server']['internal']) {
return false;
}
}