Merge branch 'ent-8501-Error-Metaconsola-y-consolas-visuales' into 'develop'

minor fix

See merge request artica/pandorafms!4672
This commit is contained in:
Daniel Rodriguez 2022-02-03 10:19:45 +00:00
commit 3ef5c57c9e
1 changed files with 11 additions and 1 deletions

View File

@ -1112,11 +1112,21 @@ class Item extends CachedModel
// The layout can be from another node.
$linkedLayoutNodeId = $linkedVisualConsole['linkedLayoutNodeId'];
// Check ACL.
if (empty($linkedLayoutNodeId) === false && \is_metaconsole() === true) {
$db_connector = metaconsole_get_connection_by_id($linkedLayoutNodeId);
metaconsole_load_external_db($db_connector);
}
$visualConsole = VC::fromDB(['id' => $vcId]);
if (empty($linkedLayoutNodeId) === false && \is_metaconsole() === true) {
metaconsole_restore_db();
}
$visualConsoleData = $visualConsole->toArray();
$vcGroupId = $visualConsoleData['groupId'];
// Check ACL.
$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