<version>1.4.0+</version>
<type>boolean</type>
</field>
+ <field>
+ <name>writable</name>
+ <description>LDAP writable.</description>
+ <version>1.4.0+</version>
+ <type>boolean</type>
+ </field>
<field>
<name>extraProperties</name>
<version>1.4.0+</version>
*/
private List<PropertyEntry> extraPropertiesEntries;
+ /**
+ * LDAP writable.
+ */
+ private boolean writable = false;
+
public LdapConfiguration()
{
// no op
{
this.baseGroupsDn = baseGroupsDn;
}
+
+ public boolean isWritable()
+ {
+ return writable;
+ }
+
+ public void setWritable( boolean writable )
+ {
+ this.writable = writable;
+ }
}
ldapConfiguration.setAuthenticationMethod(
userConfiguration.getString( UserConfigurationKeys.LDAP_AUTHENTICATION_METHOD, null ) );
+ ldapConfiguration.setWritable(
+ userConfiguration.getBoolean( UserConfigurationKeys.LDAP_WRITABLE, false ) );
+
redbackRuntimeConfiguration.setMigratedFromRedbackConfiguration( true );
updateRedbackRuntimeConfiguration( redbackRuntimeConfiguration );
{
RedbackRuntimeConfiguration conf = getRedbackRuntimeConfiguration();
+ if ( UserConfigurationKeys.LDAP_WRITABLE.equals( key ) )
+ {
+ return conf.getLdapConfiguration().isWritable();
+ }
+
if ( conf.getConfigurationProperties().containsKey( key ) )
{
return Boolean.valueOf( conf.getConfigurationProperties().get( key ) );
return getRedbackRuntimeConfiguration().getLdapConfiguration().isSsl();
}
+ if ( UserConfigurationKeys.LDAP_WRITABLE.equals( key ) )
+ {
+ return getRedbackRuntimeConfiguration().getLdapConfiguration().isWritable();
+ }
+
RedbackRuntimeConfiguration conf = getRedbackRuntimeConfiguration();
if ( conf.getConfigurationProperties().containsKey( key ) )
}
LdapConfiguration=function(hostName,port,ssl,baseDn,baseGroupsDn,contextFactory,bindDn,password,authenticationMethod,
- extraPropertiesEntries){
+ extraPropertiesEntries,writable){
var self=this;
this.modified=ko.observable(false);
this.extraPropertiesEntries=ko.observableArray(extraPropertiesEntries);
this.extraPropertiesEntries.subscribe(function(newValue){self.modified(true)});
+
+ //private boolean writable = false;
+ this.writable=ko.observable(writable);
+ this.writable.subscribe(function(newValue){self.modified(true)});
+
}
mapLdapConfiguration=function(data){
}
$.log("mapLdapConfiguration done");
return new LdapConfiguration(data.hostName,data.port,data.ssl,data.baseDn,data.baseGroupsDn,data.contextFactory,data.bindDn,data.password,
- data.authenticationMethod,extraPropertiesEntries);
+ data.authenticationMethod,extraPropertiesEntries,data.writable);
}
return null;
}
data-bind="value: redbackRuntimeConfiguration().ldapConfiguration().port"/>
</div>
</div>
+ <div class="control-group">
+ <label for="ldap-writable" class="control-label">
+ ${$.i18n.prop('redback.runtime.ldap.writable.label')}
+ </label>
+ <div class="controls">
+ <input type="checkbox" id="ldap-writable" name="ldap-ssl"
+ data-bind="checked: redbackRuntimeConfiguration().ldapConfiguration().writable"/>
+ </div>
+ </div>
<div class="control-group">
<label for="ldapBaseDn" class="control-label">
${$.i18n.prop('redback.runtime.ldap.baseDn.label')}