KEYCLOAK-18280 Issues with boolean properties of executors
This commit is contained in:
parent
bc6a746780
commit
6e139b8fda
1 changed files with 40 additions and 0 deletions
|
@ -3218,6 +3218,14 @@ module.controller('ClientPoliciesProfilesEditExecutorCtrl', function($scope, rea
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Convert boolean properties from the configuration to strings as expected by the kc-provider-config directive
|
||||
for (var j=0 ; j < $scope.executorType.properties.length ; j++) {
|
||||
var currentProperty = $scope.executorType.properties[j];
|
||||
if (currentProperty.type === 'boolean') {
|
||||
$scope.executor.config[currentProperty.name] = ($scope.executor.config[currentProperty.name]) ? "true" : "false";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3231,6 +3239,10 @@ module.controller('ClientPoliciesProfilesEditExecutorCtrl', function($scope, rea
|
|||
}
|
||||
}
|
||||
|
||||
if (configProperty.type === 'boolean') {
|
||||
return (configProperty.defaultValue) ? "true" : "false";
|
||||
}
|
||||
|
||||
if (configProperty.defaultValue !== undefined) {
|
||||
return configProperty.defaultValue;
|
||||
} else {
|
||||
|
@ -3260,6 +3272,14 @@ module.controller('ClientPoliciesProfilesEditExecutorCtrl', function($scope, rea
|
|||
|
||||
ComponentUtils.removeLastEmptyValue($scope.executor.config);
|
||||
|
||||
// Convert String properties required by the kc-provider-config directive back to booleans
|
||||
for (var j=0 ; j < $scope.executorType.properties.length ; j++) {
|
||||
var currentProperty = $scope.executorType.properties[j];
|
||||
if (currentProperty.type === 'boolean') {
|
||||
$scope.executor.config[currentProperty.name] = ($scope.executor.config[currentProperty.name] === "true") ? true : false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($scope.createNew) {
|
||||
var selectedExecutor = {
|
||||
executor: $scope.executorType.id,
|
||||
|
@ -3580,6 +3600,14 @@ module.controller('ClientPoliciesEditConditionCtrl', function($scope, realm, ser
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Convert boolean properties from the configuration to strings as expected by the kc-provider-config directive
|
||||
for (var j=0 ; j < $scope.conditionType.properties.length ; j++) {
|
||||
var currentProperty = $scope.conditionType.properties[j];
|
||||
if (currentProperty.type === 'boolean') {
|
||||
$scope.condition.config[currentProperty.name] = ($scope.condition.config[currentProperty.name]) ? "true" : "false";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3593,6 +3621,10 @@ module.controller('ClientPoliciesEditConditionCtrl', function($scope, realm, ser
|
|||
}
|
||||
}
|
||||
|
||||
if (configProperty.type === 'boolean') {
|
||||
return (configProperty.defaultValue) ? "true" : "false";
|
||||
}
|
||||
|
||||
if (configProperty.defaultValue !== undefined) {
|
||||
return configProperty.defaultValue;
|
||||
} else {
|
||||
|
@ -3623,6 +3655,14 @@ module.controller('ClientPoliciesEditConditionCtrl', function($scope, realm, ser
|
|||
|
||||
ComponentUtils.removeLastEmptyValue($scope.condition.config);
|
||||
|
||||
// Convert String properties required by the kc-provider-config directive back to booleans
|
||||
for (var j=0 ; j < $scope.conditionType.properties.length ; j++) {
|
||||
var currentProperty = $scope.conditionType.properties[j];
|
||||
if (currentProperty.type === 'boolean') {
|
||||
$scope.condition.config[currentProperty.name] = ($scope.condition.config[currentProperty.name] === "true") ? true : false;
|
||||
}
|
||||
}
|
||||
|
||||
var selectedCondition;
|
||||
if ($scope.createNew) {
|
||||
var selectedCondition = {
|
||||
|
|
Loading…
Reference in a new issue