From 062b0e08463e944d30805436002366606fbcd8ae Mon Sep 17 00:00:00 2001 From: Wolfgang Barth Date: Sat, 2 Mar 2013 14:06:43 +0100 Subject: [PATCH 1/2] make a username_postfix in config available for ldap authenticator --- lib/casserver/authenticators/ldap.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/casserver/authenticators/ldap.rb b/lib/casserver/authenticators/ldap.rb index fc3212aa..8d7caee7 100644 --- a/lib/casserver/authenticators/ldap.rb +++ b/lib/casserver/authenticators/ldap.rb @@ -57,6 +57,7 @@ def default_username_attribute # Add prefix to username, if :username_prefix was specified in the :ldap config. def preprocess_username @username = @options[:ldap][:username_prefix] + @username if @options[:ldap][:username_prefix] + @username = @username + @options[:ldap][:username_postfix] if @options[:ldap][:user_postfix] end # Attempt to bind with the LDAP server using the username and password entered by From 8b493d7fa742d48f0d6d19bbaec185b8408dc6b1 Mon Sep 17 00:00:00 2001 From: Wolfgang Barth Date: Sat, 2 Mar 2013 14:27:20 +0100 Subject: [PATCH 2/2] typo fixed: should be 'username_postfix' --- lib/casserver/authenticators/ldap.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/casserver/authenticators/ldap.rb b/lib/casserver/authenticators/ldap.rb index 8d7caee7..9f1a1daa 100644 --- a/lib/casserver/authenticators/ldap.rb +++ b/lib/casserver/authenticators/ldap.rb @@ -57,7 +57,7 @@ def default_username_attribute # Add prefix to username, if :username_prefix was specified in the :ldap config. def preprocess_username @username = @options[:ldap][:username_prefix] + @username if @options[:ldap][:username_prefix] - @username = @username + @options[:ldap][:username_postfix] if @options[:ldap][:user_postfix] + @username = @username + @options[:ldap][:username_postfix] if @options[:ldap][:username_postfix] end # Attempt to bind with the LDAP server using the username and password entered by