From 9ec137a50c5fbbe9c4f02e9eeb3733c4d1c7d05c Mon Sep 17 00:00:00 2001 From: mposolda Date: Wed, 25 Mar 2020 18:51:06 +0100 Subject: [PATCH] KEYCLOAK-13397 Creating role-ldap-mapper for realm-management client id in ldap user federation fails - alternative --- .../main/resources/theme/base/admin/resources/js/app.js | 8 ++++++-- .../admin/resources/templates/kc-component-config.html | 2 +- .../admin/resources/templates/kc-provider-config.html | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/themes/src/main/resources/theme/base/admin/resources/js/app.js b/themes/src/main/resources/theme/base/admin/resources/js/app.js index 3b49000b76..04d54b34d6 100755 --- a/themes/src/main/resources/theme/base/admin/resources/js/app.js +++ b/themes/src/main/resources/theme/base/admin/resources/js/app.js @@ -2790,14 +2790,18 @@ module.controller('ProviderConfigCtrl', function ($modal, $scope, $route, Compon }) } - $scope.changeClient = function(configName, config, client) { + $scope.changeClient = function(configName, config, client, multivalued) { if (!client || !client.id) { config[configName] = null; $scope.selectedClient = null; return; } $scope.selectedClient = client; - config[configName] = client.clientId; + if (multivalued) { + config[configName][0] = client.clientId; + } else { + config[configName] = client.clientId; + } }; ComponentUtils.convertAllMultivaluedStringValuesToList($scope.properties, $scope.config); diff --git a/themes/src/main/resources/theme/base/admin/resources/templates/kc-component-config.html b/themes/src/main/resources/theme/base/admin/resources/templates/kc-component-config.html index 41818c96a4..3f29ee7e4b 100755 --- a/themes/src/main/resources/theme/base/admin/resources/templates/kc-component-config.html +++ b/themes/src/main/resources/theme/base/admin/resources/templates/kc-component-config.html @@ -30,7 +30,7 @@
- +
diff --git a/themes/src/main/resources/theme/base/admin/resources/templates/kc-provider-config.html b/themes/src/main/resources/theme/base/admin/resources/templates/kc-provider-config.html index cd8e492191..63f488e94c 100755 --- a/themes/src/main/resources/theme/base/admin/resources/templates/kc-provider-config.html +++ b/themes/src/main/resources/theme/base/admin/resources/templates/kc-provider-config.html @@ -27,7 +27,7 @@
- +