mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 15:50:36 -05:00
- Admin -> About: Email card (delivery, server, encryption, login name, From; never the password) and a "Send test email" button that sends immediately and shows the SMTP error if it fails - SMTP: implicit TLS on port 465 (or SMTP_TLS=true), auth only with a username, 10-15 s timeouts - "Email me a sign-in link": single-use (spent by any later sign-in via a monotonic users.last_signed_in_at), 15-minute expiry, confirm step so mail scanners can't use it up, same answer for unknown addresses, rate limited, off when PASSWORD_LOGIN=false - Admin -> Users shows last sign-in Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
14 lines
1.2 KiB
ERB
14 lines
1.2 KiB
ERB
<% content_for :title, "Users" %>
|
|
<div class="mb-4 flex items-center justify-between"><h1 class="text-2xl font-bold">Users</h1><%= link_to "+ New User", new_admin_user_path, class: "btn-primary" %></div>
|
|
<section class="card"><table class="table">
|
|
<thead><tr><th>Name</th><th>Email</th><th>Aircraft</th><th>Last sign-in</th><th></th></tr></thead>
|
|
<tbody><% @users.each do |u| %><tr>
|
|
<td><%= u.name %> <% if u.admin? %><span class="badge-blue">Admin</span><% end %><% if u.sso_uid? %> <span class="badge-gray" title="Signs in with <%= Sso.label %>"><%= Sso.label %></span><% end %></td>
|
|
<td><%= u.email_address %></td>
|
|
<td class="text-xs"><%= u.aircraft_roles.map { "#{_1.aircraft.tail_number} (#{_1.role})" }.join(", ").presence || "—" %></td>
|
|
<td class="text-xs text-slate-500"><%= u.last_signed_in_at ? "#{time_ago_in_words(u.last_signed_in_at)} ago" : "never" %></td>
|
|
<td class="text-right"><%= link_to "Edit", edit_admin_user_path(u), class: "btn-secondary btn-sm" %></td>
|
|
</tr><% end %></tbody>
|
|
</table></section>
|
|
<p class="hint mt-3">After creating an account, an aircraft owner can grant access from the aircraft's “Access & Sharing” tab.</p>
|