mirror of
https://forgejo.ellis.link/continuwuation/continuwuity/
synced 2026-10-23 12:32:30 +00:00
fix: Properly show email in account page when OIDC email_claim is set
This commit is contained in:
4 files changed
+19
-4
No files matched your search
@@ -81,6 +81,10 @@ async fn route_change_email(
|
||||
) -> Result {
|
||||
let user_id = user.expect_recent(LoginTarget::ChangeEmail)?;
|
||||
|
||||
if !services.threepid.email_requirement().may_change() {
|
||||
return Err(WebError::Forbidden("You may not change your email address.".to_owned()));
|
||||
}
|
||||
|
||||
let Some(form) = form else {
|
||||
return response!(ChangeEmail::new(
|
||||
context.clone(),
|
||||
|
||||
@@ -17,14 +17,16 @@ Your account
|
||||
</p>
|
||||
{% endif %}
|
||||
<section>
|
||||
{% if email_requirement.may_change() %}
|
||||
{% if email_requirement.may_view() %}
|
||||
<p>
|
||||
{% if let Some(email) = email %}
|
||||
Your account's associated email address is <code>{{ email }}</code>.
|
||||
{% else %}
|
||||
Your account has no associated email address.
|
||||
{% endif %}
|
||||
<a href="email/change/">Change your email</a>
|
||||
{% if email_requirement.may_change() %}
|
||||
<a href="email/change/">Change your email</a>\
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if !oidc_enabled %}
|
||||
|
||||
Reference in new issue
Block a user