diff --git a/application/Espo/Core/Acl/GlobalRestriction.php b/application/Espo/Core/Acl/GlobalRestriction.php index fbdb1158a7..0407b5fc5c 100644 --- a/application/Espo/Core/Acl/GlobalRestriction.php +++ b/application/Espo/Core/Acl/GlobalRestriction.php @@ -189,12 +189,21 @@ class GlobalRestriction $resultLinkList = []; foreach ($linkList as $link) { - if ($this->metadata->get(['entityAcl', $scope, 'links', $link, $type])) { - $isNotEmpty = true; + $value = $this->metadata->get(['entityAcl', $scope, 'links', $link, $type]); - $resultLinkList[] = $link; + if (!$value && in_array($type, $this->entityDefsTypeList)) { + $value = $this->metadata->get(['entityDefs', $scope, 'links', $link, $type]); } + + if (!$value) { + continue; + } + + $isNotEmpty = true; + + $resultLinkList[] = $link; } + $scopeData->links->$type = $resultLinkList; }