diff --git a/admin/inc/class.admin_cmd.inc.php b/admin/inc/class.admin_cmd.inc.php index 6e3f520435..fc711f175c 100644 --- a/admin/inc/class.admin_cmd.inc.php +++ b/admin/inc/class.admin_cmd.inc.php @@ -1344,6 +1344,18 @@ abstract class admin_cmd } } } + if (preg_match_all('/<(int|float).*(label|id)="([^"]+)".*(label|id)="([^"]+)"/', $tpl, $matches, PREG_PATTERN_ORDER)) + { + foreach($matches[2] as $key => $name) + { + $id = $name === 'id' ? $matches[3][$key] : $matches[5][$key]; + $label= $name === 'id' ? $matches[5][$key] : $matches[3][$key]; + if (!empty($id) && !empty($label)) + { + $labels[$id] = $label; + } + } + } } error_log(__METHOD__."($name) path=$path returning ".json_encode($labels)); return $labels; diff --git a/admin/inc/class.admin_cmd_account_app.inc.php b/admin/inc/class.admin_cmd_account_app.inc.php index 8724ed1634..aa614c1f13 100644 --- a/admin/inc/class.admin_cmd_account_app.inc.php +++ b/admin/inc/class.admin_cmd_account_app.inc.php @@ -58,6 +58,13 @@ class admin_cmd_account_app extends admin_cmd $apps = admin_cmd::parse_apps($this->apps); + $old_rights = (array)$GLOBALS['egw']->acl->get_app_list_for_id('run', Egroupware\Api\Acl::READ, $account_id); + $new_rights = $this->allow ? + $old_rights + array($apps) : + array_diff($old_rights, $apps); + + $this->set = $new_rights; + $this->old = $old_rights; if ($check_only) return true; //echo "account=$this->account, account_id=$account_id, apps: ".implode(', ',$apps)."\n";