diff --git a/crates/handlers/src/graphql/model/site_config.rs b/crates/handlers/src/graphql/model/site_config.rs index a7178ca9..655430e6 100644 --- a/crates/handlers/src/graphql/model/site_config.rs +++ b/crates/handlers/src/graphql/model/site_config.rs @@ -34,11 +34,14 @@ pub struct SiteConfig { /// Imprint to show in the footer. imprint: Option, - /// Whether user can change their email. + /// Whether users can change their email. email_change_allowed: bool, - /// Whether user can change their display name. + /// Whether users can change their display name. display_name_change_allowed: bool, + + /// Whether passwords are enabled and users can change their own passwords. + password_change_allowed: bool, } #[ComplexObject] @@ -60,6 +63,7 @@ impl SiteConfig { imprint: data_model.imprint.clone(), email_change_allowed: data_model.email_change_allowed, display_name_change_allowed: data_model.displayname_change_allowed, + password_change_allowed: data_model.password_change_allowed, } } } diff --git a/frontend/schema.graphql b/frontend/schema.graphql index a4b2b3b4..2072cfd4 100644 --- a/frontend/schema.graphql +++ b/frontend/schema.graphql @@ -1341,14 +1341,18 @@ type SiteConfig implements Node { """ imprint: String """ - Whether user can change their email. + Whether users can change their email. """ emailChangeAllowed: Boolean! """ - Whether user can change their display name. + Whether users can change their display name. """ displayNameChangeAllowed: Boolean! """ + Whether passwords are enabled and users can change their own passwords. + """ + passwordChangeAllowed: Boolean! + """ The ID of the site configuration. """ id: ID! diff --git a/frontend/src/gql/graphql.ts b/frontend/src/gql/graphql.ts index c529fa5c..dd9ae367 100644 --- a/frontend/src/gql/graphql.ts +++ b/frontend/src/gql/graphql.ts @@ -997,14 +997,16 @@ export enum SetPrimaryEmailStatus { export type SiteConfig = Node & { __typename?: 'SiteConfig'; - /** Whether user can change their display name. */ + /** Whether users can change their display name. */ displayNameChangeAllowed: Scalars['Boolean']['output']; - /** Whether user can change their email. */ + /** Whether users can change their email. */ emailChangeAllowed: Scalars['Boolean']['output']; /** The ID of the site configuration. */ id: Scalars['ID']['output']; /** Imprint to show in the footer. */ imprint?: Maybe; + /** Whether passwords are enabled and users can change their own passwords. */ + passwordChangeAllowed: Scalars['Boolean']['output']; /** The URL to the privacy policy. */ policyUri?: Maybe; /** The server name of the homeserver. */ diff --git a/frontend/src/gql/schema.ts b/frontend/src/gql/schema.ts index 612c6918..95ce981b 100644 --- a/frontend/src/gql/schema.ts +++ b/frontend/src/gql/schema.ts @@ -2499,6 +2499,17 @@ export default { }, "args": [] }, + { + "name": "passwordChangeAllowed", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Any" + } + }, + "args": [] + }, { "name": "policyUri", "type": {