mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-10 16:22:50 +02:00
chore: remove unused LDAP mail attribute
This commit is contained in:
parent
c7adbae03f
commit
fb7e739b72
3 changed files with 20 additions and 32 deletions
|
@ -2063,7 +2063,7 @@ pub struct LdapConfig {
|
|||
/// Root of the searches.
|
||||
///
|
||||
/// example: "ou=users,dc=example,dc=org"
|
||||
#[serde(default)]
|
||||
#[serde(default = "empty_string_fn")]
|
||||
pub base_dn: String,
|
||||
|
||||
/// Bind DN if anonymous search is not enabled.
|
||||
|
@ -2076,7 +2076,7 @@ pub struct LdapConfig {
|
|||
///
|
||||
/// example: "cn=ldap-reader,dc=example,dc=org" or
|
||||
/// "cn={username},ou=users,dc=example,dc=org"
|
||||
#[serde(default)]
|
||||
#[serde(default = "some_empty_string_fn")]
|
||||
pub bind_dn: Option<String>,
|
||||
|
||||
/// Path to a file on the system that contains the password for the
|
||||
|
@ -2105,15 +2105,7 @@ pub struct LdapConfig {
|
|||
#[serde(default = "default_ldap_uid_attribute")]
|
||||
pub uid_attribute: String,
|
||||
|
||||
/// Attribute containing the mail of the user.
|
||||
///
|
||||
/// example: "mail"
|
||||
///
|
||||
/// default: "mail"
|
||||
#[serde(default = "default_ldap_mail_attribute")]
|
||||
pub mail_attribute: String,
|
||||
|
||||
/// Attribute containing the distinguished name of the user.
|
||||
/// Attribute containing the display name of the user.
|
||||
///
|
||||
/// example: "givenName" or "sn"
|
||||
///
|
||||
|
@ -2126,10 +2118,10 @@ pub struct LdapConfig {
|
|||
/// Defaults to `base_dn` if empty.
|
||||
///
|
||||
/// example: "ou=admins,dc=example,dc=org"
|
||||
#[serde(default)]
|
||||
#[serde(default = "empty_string_fn")]
|
||||
pub admin_base_dn: String,
|
||||
|
||||
/// The LDAP search filter to find administrative users for conduwuit.
|
||||
/// The LDAP search filter to find administrative users for continuwuity.
|
||||
///
|
||||
/// If left blank, administrative state must be configured manually for each
|
||||
/// user.
|
||||
|
@ -2138,7 +2130,7 @@ pub struct LdapConfig {
|
|||
/// entered username for more complex filters.
|
||||
///
|
||||
/// example: "(objectClass=conduwuitAdmin)" or "(uid={username})"
|
||||
#[serde(default)]
|
||||
#[serde(default = "empty_string_fn")]
|
||||
pub admin_filter: String,
|
||||
}
|
||||
|
||||
|
@ -2240,6 +2232,10 @@ impl Config {
|
|||
|
||||
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 {
|
||||
ListeningAddr {
|
||||
addrs: Right(vec![Ipv4Addr::LOCALHOST.into(), Ipv6Addr::LOCALHOST.into()]),
|
||||
|
@ -2536,6 +2532,4 @@ fn default_ldap_search_filter() -> String { "(objectClass=*)".to_owned() }
|
|||
|
||||
fn default_ldap_uid_attribute() -> String { String::from("uid") }
|
||||
|
||||
fn default_ldap_mail_attribute() -> String { String::from("mail") }
|
||||
|
||||
fn default_ldap_name_attribute() -> String { String::from("givenName") }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue