Adds full CRUD for sync users (create/list/detail/edit) behind admin auth and CSRF protection. Passwords are encrypted at rest and never decrypted into a template context; only emails may be decrypted for display on the edit form. Blank password fields on edit preserve the existing encrypted password. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
32 lines
725 B
HTML
32 lines
725 B
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}{{ user.name }} - MyWhoosh Garmin Sync{% endblock %}
|
|
|
|
{% block content %}
|
|
<h1>{{ user.name }}</h1>
|
|
<p><a href="/users/{{ user.id }}/edit">Edit</a> | <a href="/">Back to dashboard</a></p>
|
|
|
|
<dl>
|
|
<dt>Enabled</dt>
|
|
<dd>{{ "Yes" if user.enabled else "No" }}</dd>
|
|
|
|
<dt>Health state</dt>
|
|
<dd>{{ user.health_state.value }}</dd>
|
|
|
|
<dt>MyWhoosh state</dt>
|
|
<dd>{{ user.mywhoosh_state }}</dd>
|
|
|
|
<dt>Garmin state</dt>
|
|
<dd>{{ user.garmin_state }}</dd>
|
|
|
|
<dt>Action reason</dt>
|
|
<dd>{{ user.action_reason or "-" }}</dd>
|
|
|
|
<dt>Created at</dt>
|
|
<dd>{{ user.created_at }}</dd>
|
|
|
|
<dt>Updated at</dt>
|
|
<dd>{{ user.updated_at }}</dd>
|
|
</dl>
|
|
{% endblock %}
|