mirror of
https://github.com/element-hq/matrix-authentication-service.git
synced 2026-05-12 06:34:53 +00:00
syn2mas: Synapse configuration fixes (#4266)
This commit is contained in:
@@ -136,7 +136,7 @@ pub fn synapse_config_check(synapse_config: &Config) -> (Vec<CheckWarning>, Vec<
|
||||
if synapse_config.enable_registration {
|
||||
warnings.push(CheckWarning::DisableRegistrationAfterMigration);
|
||||
}
|
||||
if synapse_config.user_consent {
|
||||
if synapse_config.user_consent.is_some() {
|
||||
warnings.push(CheckWarning::DisableUserConsentAfterMigration);
|
||||
}
|
||||
|
||||
@@ -232,7 +232,7 @@ pub async fn synapse_config_check_against_mas_config(
|
||||
}
|
||||
|
||||
let mas_branding = BrandingConfig::extract_or_default(mas)?;
|
||||
if synapse.user_consent && mas_branding.tos_uri.is_none() {
|
||||
if synapse.user_consent.is_some() && mas_branding.tos_uri.is_none() {
|
||||
warnings.push(CheckWarning::ShouldPortUserConsentAsTerms);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@ use sqlx::postgres::PgConnectOptions;
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct Config {
|
||||
pub database: DatabaseSection,
|
||||
|
||||
#[serde(default)]
|
||||
pub password_config: PasswordSection,
|
||||
|
||||
#[serde(default)]
|
||||
@@ -36,7 +38,7 @@ pub struct Config {
|
||||
pub enable_3pid_changes: bool,
|
||||
|
||||
#[serde(default)]
|
||||
pub user_consent: bool,
|
||||
pub user_consent: Option<UserConsentSection>,
|
||||
|
||||
#[serde(default)]
|
||||
pub registrations_require_3pid: Vec<String>,
|
||||
@@ -297,3 +299,8 @@ mod test {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// We don't care about any of the fields in this section,
|
||||
/// just whether it's present.
|
||||
#[derive(Deserialize)]
|
||||
pub struct UserConsentSection {}
|
||||
|
||||
Reference in New Issue
Block a user