KEYCLOAK-2253 - Use string representation for boolean properties in GenericUserFederationCtrl.

Adapted due to code review.
This commit is contained in:
Thomas Darimont 2016-01-04 23:07:08 +01:00
parent 3ec516d14c
commit edcc39d906
2 changed files with 2 additions and 3 deletions

View file

@ -649,8 +649,7 @@ module.controller('GenericUserFederationCtrl', function($scope, $location, Notif
for (var i = 0; i < providerFactory.properties.length; i++) {
var configProperty = providerFactory.properties[i];
var configValue = configProperty.type == "boolean" ? (configProperty.defaultValue === true ? 'true' : 'false') : configProperty.defaultValue;
instance.config[configProperty.name] = configValue;
instance.config[configProperty.name] = configProperty.defaultValue;
}
}

View file

@ -103,7 +103,7 @@ public class DummyUserFederationProviderFactory implements UserFederationProvide
ProviderConfigProperty prop2 = new ProviderConfigProperty();
prop2.setName("prop2");
prop2.setLabel("Prop2");
prop2.setDefaultValue(true);
prop2.setDefaultValue("true");
prop2.setHelpText("Prop2 HelpText");
prop2.setType(ProviderConfigProperty.BOOLEAN_TYPE);