mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
chore: Fix default attributes for config
This commit is contained in:
@@ -1797,7 +1797,7 @@
|
|||||||
#
|
#
|
||||||
# example: "ou=users,dc=example,dc=org"
|
# example: "ou=users,dc=example,dc=org"
|
||||||
#
|
#
|
||||||
#base_dn =
|
#base_dn = ""
|
||||||
|
|
||||||
# Bind DN if anonymous search is not enabled.
|
# Bind DN if anonymous search is not enabled.
|
||||||
#
|
#
|
||||||
@@ -1846,7 +1846,7 @@
|
|||||||
#
|
#
|
||||||
# example: "ou=admins,dc=example,dc=org"
|
# example: "ou=admins,dc=example,dc=org"
|
||||||
#
|
#
|
||||||
#admin_base_dn =
|
#admin_base_dn = ""
|
||||||
|
|
||||||
# The LDAP search filter to find administrative users for continuwuity.
|
# The LDAP search filter to find administrative users for continuwuity.
|
||||||
#
|
#
|
||||||
|
|||||||
+12
-8
@@ -2063,7 +2063,9 @@ pub struct LdapConfig {
|
|||||||
/// Root of the searches.
|
/// Root of the searches.
|
||||||
///
|
///
|
||||||
/// example: "ou=users,dc=example,dc=org"
|
/// example: "ou=users,dc=example,dc=org"
|
||||||
#[serde(default = "empty_string_fn")]
|
///
|
||||||
|
/// default: ""
|
||||||
|
#[serde(default)]
|
||||||
pub base_dn: String,
|
pub base_dn: String,
|
||||||
|
|
||||||
/// Bind DN if anonymous search is not enabled.
|
/// Bind DN if anonymous search is not enabled.
|
||||||
@@ -2076,7 +2078,9 @@ pub struct LdapConfig {
|
|||||||
///
|
///
|
||||||
/// example: "cn=ldap-reader,dc=example,dc=org" or
|
/// example: "cn=ldap-reader,dc=example,dc=org" or
|
||||||
/// "cn={username},ou=users,dc=example,dc=org"
|
/// "cn={username},ou=users,dc=example,dc=org"
|
||||||
#[serde(default = "some_empty_string_fn")]
|
///
|
||||||
|
/// default:
|
||||||
|
#[serde(default)]
|
||||||
pub bind_dn: Option<String>,
|
pub bind_dn: Option<String>,
|
||||||
|
|
||||||
/// Path to a file on the system that contains the password for the
|
/// Path to a file on the system that contains the password for the
|
||||||
@@ -2118,7 +2122,9 @@ pub struct LdapConfig {
|
|||||||
/// Defaults to `base_dn` if empty.
|
/// Defaults to `base_dn` if empty.
|
||||||
///
|
///
|
||||||
/// example: "ou=admins,dc=example,dc=org"
|
/// example: "ou=admins,dc=example,dc=org"
|
||||||
#[serde(default = "empty_string_fn")]
|
///
|
||||||
|
/// default: ""
|
||||||
|
#[serde(default)]
|
||||||
pub admin_base_dn: String,
|
pub admin_base_dn: String,
|
||||||
|
|
||||||
/// The LDAP search filter to find administrative users for continuwuity.
|
/// The LDAP search filter to find administrative users for continuwuity.
|
||||||
@@ -2130,7 +2136,9 @@ pub struct LdapConfig {
|
|||||||
/// entered username for more complex filters.
|
/// entered username for more complex filters.
|
||||||
///
|
///
|
||||||
/// example: "(objectClass=conduwuitAdmin)" or "(uid={username})"
|
/// example: "(objectClass=conduwuitAdmin)" or "(uid={username})"
|
||||||
#[serde(default = "empty_string_fn")]
|
///
|
||||||
|
/// default:
|
||||||
|
#[serde(default)]
|
||||||
pub admin_filter: String,
|
pub admin_filter: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2232,10 +2240,6 @@ impl Config {
|
|||||||
|
|
||||||
fn true_fn() -> bool { true }
|
fn true_fn() -> bool { true }
|
||||||
|
|
||||||
fn empty_string_fn() -> String { String::new() }
|
|
||||||
|
|
||||||
fn some_empty_string_fn() -> Option<String> { Some(String::new()) }
|
|
||||||
|
|
||||||
fn default_address() -> ListeningAddr {
|
fn default_address() -> ListeningAddr {
|
||||||
ListeningAddr {
|
ListeningAddr {
|
||||||
addrs: Right(vec![Ipv4Addr::LOCALHOST.into(), Ipv6Addr::LOCALHOST.into()]),
|
addrs: Right(vec![Ipv4Addr::LOCALHOST.into(), Ipv6Addr::LOCALHOST.into()]),
|
||||||
|
|||||||
Reference in New Issue
Block a user