fix record tree

This commit is contained in:
Yuri Kuznetsov
2021-08-11 11:23:12 +03:00
parent 4b0604a183
commit b4d0343992
+12 -3
View File
@@ -43,6 +43,8 @@ use Espo\Core\{
Record\UpdateParams,
};
use Espo\Core\Acl\Exceptions\NotImplemented;
use StdClass;
class RecordTree extends Record
@@ -148,11 +150,18 @@ class RecordTree extends Record
return $collection;
}
protected function checkFilterOnlyNotEmpty()
protected function checkFilterOnlyNotEmpty(): bool
{
if (!$this->acl->checkScope($this->subjectEntityType, 'create')) {
return true;
try {
if (!$this->acl->checkScope($this->subjectEntityType, 'create')) {
return true;
}
}
catch (NotImplemented $e) {
return false;
}
return false;
}
protected function checkItemIsEmpty(Entity $entity): bool