<type>boolean</type>
<defaultValue>false</defaultValue>
</field>
+ <field>
+ <name>useRoleNameAsGroup</name>
+ <description>Will use role name as LDAP group.</description>
+ <version>1.4.0+</version>
+ <type>boolean</type>
+ <defaultValue>false</defaultValue>
+ </field>
<field>
<name>extraProperties</name>
<version>1.4.0+</version>
*/
private boolean bindAuthenticatorEnabled;
+ /**
+ * Will use role name as LDAP group.
+ */
+ private boolean useRoleNameAsGroup = false;
+
/**
* Field extraProperties.
*/
{
this.writable = writable;
}
+
+ public boolean isUseRoleNameAsGroup()
+ {
+ return useRoleNameAsGroup;
+ }
+
+ public void setUseRoleNameAsGroup( boolean useRoleNameAsGroup )
+ {
+ this.useRoleNameAsGroup = useRoleNameAsGroup;
+ }
}
ldapConfiguration.setWritable(
userConfiguration.getBoolean( UserConfigurationKeys.LDAP_WRITABLE, false ) );
+ ldapConfiguration.setUseRoleNameAsGroup(
+ userConfiguration.getBoolean( UserConfigurationKeys.LDAP_GROUPS_USE_ROLENAME, false ) );
+
redbackRuntimeConfiguration.setMigratedFromRedbackConfiguration( true );
updateRedbackRuntimeConfiguration( redbackRuntimeConfiguration );
return conf.getLdapConfiguration().isWritable();
}
+ if ( UserConfigurationKeys.LDAP_GROUPS_USE_ROLENAME.equals( key ) )
+ {
+ return conf.getLdapConfiguration().isUseRoleNameAsGroup();
+ }
+
if ( conf.getConfigurationProperties().containsKey( key ) )
{
return Boolean.valueOf( conf.getConfigurationProperties().get( key ) );
return getRedbackRuntimeConfiguration().getLdapConfiguration().isWritable();
}
+ if ( UserConfigurationKeys.LDAP_GROUPS_USE_ROLENAME.equals( key ) )
+ {
+ return getRedbackRuntimeConfiguration().getLdapConfiguration().isUseRoleNameAsGroup();
+ }
+
RedbackRuntimeConfiguration conf = getRedbackRuntimeConfiguration();
if ( conf.getConfigurationProperties().containsKey( key ) )
}
LdapConfiguration=function(hostName,port,ssl,baseDn,baseGroupsDn,contextFactory,bindDn,password,authenticationMethod,
- extraPropertiesEntries,writable){
+ extraPropertiesEntries,writable,useRoleNameAsGroup){
var self=this;
this.modified=ko.observable(false);
this.writable=ko.observable(writable);
this.writable.subscribe(function(newValue){self.modified(true)});
+ // useRoleNameAsGroup
+ this.useRoleNameAsGroup=ko.observable(useRoleNameAsGroup);
+ this.useRoleNameAsGroup.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.writable);
+ data.authenticationMethod,extraPropertiesEntries,data.writable,data.useRoleNameAsGroup);
}
return null;
}
data-bind="checked: redbackRuntimeConfiguration().ldapConfiguration().ssl"/>
</div>
</div>
+ <div class="control-group">
+ <label for="ldap-useRoleNameAsGroup" class="control-label">
+ ${$.i18n.prop('redback.runtime.ldap.useRoleNameAsGroup.label')}
+ </label>
+ <div class="controls">
+ <input type="checkbox" id="ldap-useRoleNameAsGroup" name="ldap-useRoleNameAsGroup"
+ data-bind="checked: redbackRuntimeConfiguration().ldapConfiguration().useRoleNameAsGroup"/>
+ </div>
+ </div>
+
<div class="control-group">
<label for="ldapPassword" class="control-label">
${$.i18n.prop('redback.runtime.ldap.password.label')}