add mode maintenance VC pandora_enterprise#4822

This commit is contained in:
Daniel Barbero 2022-10-14 10:58:18 +02:00
parent ace6bcc854
commit f2c5e496de
1 changed files with 12 additions and 10 deletions

View File

@ -3815,22 +3815,24 @@ function visual_map_get_user_layouts(
$retval = [];
foreach ($layouts as $layout) {
if ($only_names) {
$retval[$layout['id']]['name'] = $layout['name'];
$retval[$layout['id']] = $layout['name'];
} else {
$retval[$layout['id']] = $layout;
}
// Aad_perms.
if (isset($groups[$layout['id_group']]['vconsole_view'])) {
$retval[$layout['id']]['vr'] = $groups[$layout['id_group']]['vconsole_view'];
}
if ($only_names === false) {
// Aad_perms.
if (isset($groups[$layout['id_group']]['vconsole_view'])) {
$retval[$layout['id']]['vr'] = $groups[$layout['id_group']]['vconsole_view'];
}
if (isset($groups[$layout['id_group']]['vconsole_edit'])) {
$retval[$layout['id']]['vw'] = $groups[$layout['id_group']]['vconsole_edit'];
}
if (isset($groups[$layout['id_group']]['vconsole_edit'])) {
$retval[$layout['id']]['vw'] = $groups[$layout['id_group']]['vconsole_edit'];
}
if (isset($groups[$layout['id_group']]['vconsole_management'])) {
$retval[$layout['id']]['vm'] = $groups[$layout['id_group']]['vconsole_management'];
if (isset($groups[$layout['id_group']]['vconsole_management'])) {
$retval[$layout['id']]['vm'] = $groups[$layout['id_group']]['vconsole_management'];
}
}
}