diff options
author | Olivier Lamy <olamy@apache.org> | 2013-02-13 10:31:28 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2013-02-13 10:31:28 +0000 |
commit | 114eb24636a5a949b193b4975cd5d676346e6bcb (patch) | |
tree | 0b59c2ffff6e70011f6cde2db50d4d6927fa80b2 /archiva-modules | |
parent | 08297071c29d854df85da3a8d748808fb61eaadb (diff) | |
download | archiva-114eb24636a5a949b193b4975cd5d676346e6bcb.tar.gz archiva-114eb24636a5a949b193b4975cd5d676346e6bcb.zip |
add ldap bind authenticator enabled as a archiva config
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1445544 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
2 files changed, 17 insertions, 2 deletions
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java index 98858c1b3..538bf9876 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java @@ -138,6 +138,9 @@ public class DefaultRedbackRuntimeConfigurationAdmin ldapConfiguration.setUseRoleNameAsGroup( userConfiguration.getBoolean( UserConfigurationKeys.LDAP_GROUPS_USE_ROLENAME, false ) ); + ldapConfiguration.setBindAuthenticatorEnabled( + userConfiguration.getBoolean( UserConfigurationKeys.LDAP_BIND_AUTHENTICATOR_ENABLED, false ) ); + redbackRuntimeConfiguration.setMigratedFromRedbackConfiguration( true ); updateRedbackRuntimeConfiguration( redbackRuntimeConfiguration ); @@ -460,6 +463,11 @@ public class DefaultRedbackRuntimeConfigurationAdmin return conf.getLdapConfiguration().isUseRoleNameAsGroup(); } + if ( UserConfigurationKeys.LDAP_BIND_AUTHENTICATOR_ENABLED.equals( key ) ) + { + return conf.getLdapConfiguration().isBindAuthenticatorEnabled(); + } + if ( conf.getConfigurationProperties().containsKey( key ) ) { return Boolean.valueOf( conf.getConfigurationProperties().get( key ) ); @@ -498,6 +506,11 @@ public class DefaultRedbackRuntimeConfigurationAdmin return getRedbackRuntimeConfiguration().getLdapConfiguration().isUseRoleNameAsGroup(); } + if ( UserConfigurationKeys.LDAP_BIND_AUTHENTICATOR_ENABLED.equals( key ) ) + { + return getRedbackRuntimeConfiguration().getLdapConfiguration().isBindAuthenticatorEnabled(); + } + RedbackRuntimeConfiguration conf = getRedbackRuntimeConfiguration(); if ( conf.getConfigurationProperties().containsKey( key ) ) diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/general-admin.js b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/general-admin.js index 316984995..efb9531fa 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/general-admin.js +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/general-admin.js @@ -1290,7 +1290,7 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout" } LdapConfiguration=function(hostName,port,ssl,baseDn,baseGroupsDn,contextFactory,bindDn,password,authenticationMethod, - extraPropertiesEntries,writable,useRoleNameAsGroup){ + extraPropertiesEntries,writable,useRoleNameAsGroup,bindAuthenticatorEnabled){ var self=this; this.modified=ko.observable(false); @@ -1342,6 +1342,8 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout" this.useRoleNameAsGroup=ko.observable(useRoleNameAsGroup); this.useRoleNameAsGroup.subscribe(function(newValue){self.modified(true)}); + //bindAuthenticatorEnabled + } mapLdapConfiguration=function(data){ @@ -1355,7 +1357,7 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout" } $.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.useRoleNameAsGroup); + data.authenticationMethod,extraPropertiesEntries,data.writable,data.useRoleNameAsGroup,data.bindAuthenticatorEnabled); } return null; } |