selectAccessControlDisabled
This commit is contained in:
@@ -141,8 +141,6 @@ class Service implements Crud,
|
||||
protected $nonAdminReadOnlyLinkList = [];
|
||||
/** @var string[] */
|
||||
protected $onlyAdminLinkList = [];
|
||||
/** @var array<string, array<string, mixed>> */
|
||||
protected $linkParams = [];
|
||||
/** @var array<string, string[]> */
|
||||
protected $linkMandatorySelectAttributeList = [];
|
||||
/** @var string[] */
|
||||
@@ -966,14 +964,11 @@ class Service implements Crud,
|
||||
->getRelation($link)
|
||||
->getForeignEntityType();
|
||||
|
||||
$linkParams = $this->linkParams[$link] ?? [];
|
||||
$skipAcl = $this->metadata
|
||||
->get("recordDefs.$this->entityType.relationships.$link.selectAccessControlDisabled") ?? false;
|
||||
|
||||
$skipAcl = $linkParams['skipAcl'] ?? false;
|
||||
|
||||
if (!$skipAcl) {
|
||||
if (!$this->acl->check($foreignEntityType, AclTable::ACTION_READ)) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
if (!$skipAcl && !$this->acl->check($foreignEntityType, AclTable::ACTION_READ)) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
$recordService = $this->recordServiceContainer->get($foreignEntityType);
|
||||
|
||||
@@ -101,6 +101,10 @@
|
||||
"additionalProperties": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"selectAccessControlDisabled": {
|
||||
"description": "Disable access control when listing related records; only access to a parent record will be checked.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"linkRequiredAccess": {
|
||||
"description": "Access to a current record that is needed to be able to link and unlink records.",
|
||||
"type": "string",
|
||||
@@ -116,7 +120,7 @@
|
||||
"type": "boolean"
|
||||
},
|
||||
"linkCheckDisabled": {
|
||||
"description": "Disable a link-check functionallity linking through link-multiple field.",
|
||||
"description": "Disable a link-check functionality when linking through link-multiple field.",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user