fix: Hide password change link when OIDC is enabled

This commit is contained in:
Ginger committed 2026-07-02 16:34:38 -04:00
1 parent e649af33b9
commit 8c77bd61e5
2 files changed
+8 -4

No files matched your search

+2
View File
@@ -66,6 +66,7 @@ template! {
enum AccountBody {
Unlocked {
suspended: bool,
oidc_enabled: bool,
email_requirement: EmailRequirement,
email: Option<String>,
devices: Vec<DeviceCard>,
@@ -128,6 +129,7 @@ async fn get_account(
response!(Account::new(context, user_card, AccountBody::Unlocked {
suspended,
oidc_enabled: services.oidc.enabled(),
email_requirement,
email,
devices: device_cards
+6 -4
View File
@@ -9,7 +9,7 @@ Your account
<h1>Manage your account</h1>
{{ user_card }}
{% match body %}
{% when AccountBody::Unlocked { suspended, email_requirement, email, devices } %}
{% when AccountBody::Unlocked { suspended, email_requirement, email, devices, oidc_enabled } %}
{% if suspended %}
<p class="card danger">
⚠️ Your account has been suspended by your homeserver's administrator.
@@ -27,9 +27,11 @@ Your account
<a href="email/change/">Change your email</a>
</p>
{% endif %}
<p>
<a href="password/change">Change your password</a>
</p>
{% if !oidc_enabled %}
<p>
<a href="password/change">Change your password</a>
</p>
{% endif %}
</section>
<section>