mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-13 20:26:52 +00:00
fix: Hide password change link when OIDC is enabled
This commit is contained in:
2 files changed
+8
-4
No files matched your search
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user