pub struct SiteConfig {Show 20 fields
pub access_token_ttl: Duration,
pub compat_token_ttl: Duration,
pub server_name: String,
pub policy_uri: Option<Url>,
pub tos_uri: Option<Url>,
pub imprint: Option<String>,
pub password_login_enabled: bool,
pub password_registration_enabled: bool,
pub password_registration_email_required: bool,
pub registration_token_required: bool,
pub email_change_allowed: bool,
pub displayname_change_allowed: bool,
pub password_change_allowed: bool,
pub account_recovery_allowed: bool,
pub account_deactivation_allowed: bool,
pub captcha: Option<CaptchaConfig>,
pub minimum_password_complexity: u8,
pub session_expiration: Option<SessionExpirationConfig>,
pub login_with_email_allowed: bool,
pub plan_management_iframe_uri: Option<String>,
}Expand description
Random site configuration we want accessible in various places.
Fields§
§access_token_ttl: DurationTime-to-live of access tokens.
compat_token_ttl: DurationTime-to-live of compatibility access tokens.
server_name: StringThe server name, e.g. “matrix.org”.
policy_uri: Option<Url>The URL to the privacy policy.
tos_uri: Option<Url>The URL to the terms of service.
imprint: Option<String>Imprint to show in the footer.
password_login_enabled: boolWhether password login is enabled.
password_registration_enabled: boolWhether password registration is enabled.
password_registration_email_required: boolWhether a valid email address is required for password registrations.
registration_token_required: boolWhether registration tokens are required for password registrations.
email_change_allowed: boolWhether users can change their email.
displayname_change_allowed: boolWhether users can change their display name.
password_change_allowed: boolWhether users can change their password.
account_recovery_allowed: boolWhether users can recover their account via email.
account_deactivation_allowed: boolWhether users can delete their own account.
captcha: Option<CaptchaConfig>Captcha configuration
minimum_password_complexity: u8Minimum password complexity, between 0 and 4. This is a score from zxcvbn.
session_expiration: Option<SessionExpirationConfig>§login_with_email_allowed: boolWhether users can log in with their email address.
plan_management_iframe_uri: Option<String>The iframe URL to show in the plan tab of the UI
Trait Implementations§
Source§impl Clone for SiteConfig
impl Clone for SiteConfig
Source§fn clone(&self) -> SiteConfig
fn clone(&self) -> SiteConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for SiteConfig
impl RefUnwindSafe for SiteConfig
impl Send for SiteConfig
impl Sync for SiteConfig
impl Unpin for SiteConfig
impl UnwindSafe for SiteConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more