Files
sure/app/views/admin/users/deletion.html.erb
T
Josh ca66346dc5 feat: add safe admin user removal (#3131)
* feat: add safe admin user removal

* fix: address user removal review findings

* fix: close remaining user removal review gaps

* fix: handle deleted users during session creation

* fix: fail closed when session creation fails

* fix: reject token issuance for inactive users
2026-08-22 21:54:32 +02:00

31 lines
1015 B
ERB

<%= render DS::Dialog.new(width: "sm") do |dialog| %>
<% dialog.with_header(title: t(".title"), subtitle: t(".warning")) %>
<% dialog.with_body do %>
<p class="mb-4 text-sm text-secondary"><%= t(".instruction", email: @user.email) %></p>
<%= styled_form_with url: admin_user_path(@user), method: :delete, data: { turbo_frame: "_top" } do |form| %>
<%= form.text_field :confirmation_email,
label: t(".email_label"),
autocomplete: "off",
spellcheck: false,
required: true,
class: "mb-4" %>
<div class="flex justify-end gap-2">
<%= render DS::Button.new(
text: t(".cancel"),
type: "button",
variant: :secondary,
data: { action: "DS--dialog#close" }
) %>
<%= render DS::Button.new(
text: t(".submit"),
type: "submit",
variant: :destructive
) %>
</div>
<% end %>
<% end %>
<% end %>