Fix LDAP configuration default semantics. (fixes #30)

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk committed 2025-04-28 22:44:16 +00:00
1 parent 7665d47e59
commit f242ebdb04
2 files changed
+17 -5

No files matched your search

+3 -3
View File
@@ -1806,6 +1806,7 @@ pub struct Config {
pub blurhashing: BlurhashConfig,
// external structure; separate section
#[serde(default)]
pub ldap: LdapConfig,
#[serde(flatten)]
@@ -1889,7 +1890,7 @@ pub struct BlurhashConfig {
pub blurhash_max_raw_size: u64,
}
#[derive(Clone, Debug, Deserialize)]
#[derive(Clone, Debug, Default, Deserialize)]
#[config_example_generator(filename = "tuwunel-example.toml", section = "global.ldap")]
pub struct LdapConfig {
/// Whether to enable LDAP login.
@@ -1901,8 +1902,7 @@ pub struct LdapConfig {
/// URI of the LDAP server.
///
/// example: "ldap://ldap.example.com:389"
#[serde(deserialize_with = "crate::utils::deserialize_from_str")]
pub uri: Url,
pub uri: Option<Url>,
/// Root of the searches.
///