Profile: only edit fields Dex reads back
The Dex LDAP connector publishes uid, cn and mail as claims, so the profile page now offers just Name (cn), the verified email change and the password. The photo endpoint, SSH keys, addresses, phones and other extended attributes are no longer read or written; existing LDAP values are left untouched. Apache's profile upload limit drops back to the 256 KiB used by other member routes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
<header class="profile-heading">
|
||||
<p class="eyebrow">One account. Your own identity.</p>
|
||||
<h1>Your profile</h1>
|
||||
<p>Your profile is shared across eom.dev services. Your gamer tag is also reused by gaming services. Add only information you want to share with those services.</p>
|
||||
<p>Your eom.dev account is shared across every service you sign in to. Services see your username, name and email address.</p>
|
||||
{% if account %}<p class="member-small">Signed in as <strong>{{ account.uid }}</strong>. Your username cannot be changed here.</p>{% endif %}
|
||||
</header>
|
||||
{% if saved %}<p class="member-notice" role="status">Your changes have been saved.</p>{% endif %}
|
||||
@@ -43,56 +43,21 @@
|
||||
</section>
|
||||
{% else %}
|
||||
<nav class="profile-jump-links" aria-label="Profile sections">
|
||||
<a href="#identity">Identity</a><a href="#contact">Contact</a><a href="#addresses">Addresses</a><a href="#security">SSH keys</a><a href="#email">Email</a>{% if newsletter_status %}<a href="#newsletter">Newsletter</a>{% endif %}<a href="#password">Password</a>
|
||||
<a href="#identity">Name</a><a href="#email">Email</a>{% if newsletter_status %}<a href="#newsletter">Newsletter</a>{% endif %}<a href="#password">Password</a>
|
||||
</nav>
|
||||
<form action="{% url 'members:profile' %}" method="post" enctype="multipart/form-data" class="profile-edit-form">
|
||||
<form id="identity" action="{% url 'members:profile' %}" method="post" class="member-panel profile-section profile-edit-form" aria-labelledby="identity-heading">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="action" value="profile">
|
||||
<input type="hidden" name="revision" value="{{ revision }}">
|
||||
{% if form.errors %}<div class="profile-errors" role="alert"><h2>Check your profile details</h2><p>No profile changes have been saved. Correct the fields marked below and enter your current password again.</p>{{ form.non_field_errors }}</div>{% endif %}
|
||||
<fieldset id="identity" class="member-panel profile-section">
|
||||
<legend>Identity</legend>
|
||||
<p>Tell the community who you are. Last name is required. Text fields support multiple values: one per line, up to 16 per field. Blank optional fields are cleared when you save.</p>
|
||||
{% include "profile_fields.html" with fields=form.identity_fields only %}
|
||||
{% if has_photo %}<figure class="profile-photo"><img src="{% url 'members:profile_photo' %}" width="128" height="128" alt="Your current profile photo"><figcaption>Current profile photo</figcaption></figure>{% endif %}
|
||||
<div class="profile-field">
|
||||
{{ form.jpegPhoto.label_tag }}
|
||||
<p class="helptext" id="{{ form.jpegPhoto.auto_id }}_helptext">{{ form.jpegPhoto.help_text }}</p>
|
||||
{{ form.jpegPhoto }}
|
||||
{% if form.jpegPhoto.errors %}<div id="{{ form.jpegPhoto.auto_id }}_error" role="alert">{{ form.jpegPhoto.errors }}</div>{% endif %}
|
||||
</div>
|
||||
<div class="profile-field profile-checkbox">{{ form.remove_photo }} {{ form.remove_photo.label_tag }}{% if form.remove_photo.errors %}<div id="{{ form.remove_photo.auto_id }}_error" role="alert">{{ form.remove_photo.errors }}</div>{% endif %}</div>
|
||||
<p class="member-small">Leave the photo field empty to keep your photo. To remove it, select the checkbox without uploading a replacement.</p>
|
||||
</fieldset>
|
||||
<fieldset id="contact" class="member-panel profile-section">
|
||||
<legend>Contact</legend>
|
||||
<p>Choose the websites and phone numbers to share. Email changes are verified separately below.</p>
|
||||
{% include "profile_fields.html" with fields=form.contact_fields only %}
|
||||
</fieldset>
|
||||
<fieldset id="addresses" class="member-panel profile-section">
|
||||
<legend>Addresses</legend>
|
||||
<p>Address details are optional. For postal addresses, use a blank line between entries; other fields use one value per line.</p>
|
||||
{% include "profile_fields.html" with fields=form.address_fields only %}
|
||||
</fieldset>
|
||||
<fieldset id="security" class="member-panel profile-section">
|
||||
<legend>SSH keys</legend>
|
||||
<p>Share public keys only. Never paste a private key or a password here.</p>
|
||||
<div class="profile-field">
|
||||
{{ form.sshPublicKey.label_tag }}
|
||||
<p class="helptext" id="{{ form.sshPublicKey.auto_id }}_helptext">{{ form.sshPublicKey.help_text }}</p>
|
||||
{{ form.sshPublicKey }}
|
||||
{% if form.sshPublicKey.errors %}<div id="{{ form.sshPublicKey.auto_id }}_error" role="alert">{{ form.sshPublicKey.errors }}</div>{% endif %}
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="member-panel profile-section">
|
||||
<legend>Authorize profile changes</legend>
|
||||
{% include "profile_fields.html" with fields=form.authorization_fields only %}
|
||||
<button class="button button-primary" type="submit">Save profile</button>
|
||||
</fieldset>
|
||||
<h2 id="identity-heading">Name</h2>
|
||||
{% if form.errors %}<div class="profile-errors" role="alert"><p>Your name has not been saved. Correct the fields marked below and enter your current password again.</p>{{ form.non_field_errors }}</div>{% endif %}
|
||||
{% include "profile_fields.html" with fields=form.identity_fields only %}
|
||||
{% include "profile_fields.html" with fields=form.authorization_fields only %}
|
||||
<button class="button button-primary" type="submit">Save name</button>
|
||||
</form>
|
||||
<section id="email" class="member-panel profile-section" aria-labelledby="email-heading">
|
||||
<h2 id="email-heading">Email address</h2>
|
||||
<p>Currently stored email addresses (read-only):</p>
|
||||
<p>Current email address:</p>
|
||||
<ul class="profile-email-values">{% for email in email_values %}<li>{{ email }}</li>{% empty %}<li>No email address stored.</li>{% endfor %}</ul>
|
||||
<p>A verified change replaces <strong>all</strong> currently stored email addresses with the new address. We will email a verification link to the new address; nothing changes until you confirm it with your current password.</p>
|
||||
<form action="{% url 'members:profile' %}" method="post">
|
||||
|
||||
Reference in New Issue
Block a user