Fix linked ACL another VC

This commit is contained in:
Daniel Barbero Martin 2020-02-11 09:45:43 +01:00
parent 1d2ad47507
commit 962b3d2248
1 changed files with 13 additions and 0 deletions

View File

@ -1052,6 +1052,19 @@ class Item extends CachedModel
// The layout can be from another node.
$linkedLayoutNodeId = $linkedVisualConsole['linkedLayoutNodeId'];
// Check ACL.
$visualConsole = VC::fromDB(['id' => $vcId]);
$visualConsoleData = $visualConsole->toArray();
$vcGroupId = $visualConsoleData['groupId'];
$aclRead = \check_acl($config['id_user'], $vcGroupId, 'VR');
// To build the link to another visual console
// you must have read permissions of the visual console
// with which it is linked.
if ($aclRead === 0) {
return null;
}
if (empty($linkedLayoutNodeId) === true && \is_metaconsole()) {
/*
* A Visual Console from this console.