aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-07-18 12:31:29 +0200
committerKim Alvefur <zash@zash.se>2023-07-18 12:31:29 +0200
commit88e969dec2283cdc12f2095088bf455f679388b4 (patch)
treeaddacfa30d52f8acba089c6ffa22352364166623 /plugins
parent5d673d06206ea3f729403769923c18a992493826 (diff)
downloadprosody-88e969dec2283cdc12f2095088bf455f679388b4.tar.gz
prosody-88e969dec2283cdc12f2095088bf455f679388b4.zip
mod_auth_ldap: Use enum option method
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_auth_ldap.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_auth_ldap.lua b/plugins/mod_auth_ldap.lua
index 7900b3fe..569cef6b 100644
--- a/plugins/mod_auth_ldap.lua
+++ b/plugins/mod_auth_ldap.lua
@@ -12,10 +12,10 @@ local ldap_server = module:get_option_string("ldap_server", "localhost");
local ldap_rootdn = module:get_option_string("ldap_rootdn", "");
local ldap_password = module:get_option_string("ldap_password", "");
local ldap_tls = module:get_option_boolean("ldap_tls");
-local ldap_scope = module:get_option_string("ldap_scope", "subtree");
+local ldap_scope = module:get_option_enum("ldap_scope", "subtree", "base", "onelevel");
local ldap_filter = module:get_option_string("ldap_filter", "(uid=$user)"):gsub("%%s", "$user", 1);
local ldap_base = assert(module:get_option_string("ldap_base"), "ldap_base is a required option for ldap");
-local ldap_mode = module:get_option_string("ldap_mode", "bind");
+local ldap_mode = module:get_option_enum("ldap_mode", "bind", "getpasswd");
local ldap_admins = module:get_option_string("ldap_admin_filter",
module:get_option_string("ldap_admins")); -- COMPAT with mistake in documentation
local host = ldap_filter_escape(module:get_option_string("realm", module.host));