diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2014-09-23 11:31:44 +0200 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2014-09-23 11:31:44 +0200 |
commit | 61c88367408950fe5e6de2627d00af73093c3db3 (patch) | |
tree | 538b175bb61bd65d61b903369969ee0a8d59d989 /src | |
parent | Merge pull request #301 from Iperity/master (diff) |
Rename deref_aliases back to ldap_deref_aliases
The "ldap_deref_aliases" option has accidentally been renamed to
"deref_aliases". Revert that change (but accept both names for a
while), so that the option name now matches the documentation again.
Diffstat (limited to 'src')
-rw-r--r-- | src/eldap_utils.erl | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/src/eldap_utils.erl b/src/eldap_utils.erl index a87023437..e6e874a63 100644 --- a/src/eldap_utils.erl +++ b/src/eldap_utils.erl @@ -228,13 +228,28 @@ get_config(Host, Opts) -> Base = get_opt({ldap_base, Host}, Opts, fun iolist_to_binary/1, <<"">>), - DerefAliases = get_opt({deref_aliases, Host}, Opts, - fun(never) -> never; - (searching) -> searching; - (finding) -> finding; - (always) -> always - end, never), - #eldap_config{servers = Servers, + OldDerefAliases = get_opt({deref_aliases, Host}, Opts, + fun(never) -> never; + (searching) -> searching; + (finding) -> finding; + (always) -> always + end, unspecified), + DerefAliases = + if OldDerefAliases == unspecified -> + get_opt({ldap_deref_aliases, Host}, Opts, + fun(never) -> never; + (searching) -> searching; + (finding) -> finding; + (always) -> always + end, never); + true -> + ?WARNING_MSG("Option 'deref_aliases' is deprecated. " + "The option is still supported " + "but it is better to fix your config: " + "use 'ldap_deref_aliases' instead.", []), + OldDerefAliases + end, + #eldap_config{servers = Servers, backups = Backups, tls_options = [{encrypt, Encrypt}, {tls_verify, TLSVerify}, |