% content_for :page_title, "Editing user: #{@user.name}" %> <% content_for :page_description do %> You are editing <%= link_to((@user == current_user ? "your own profile" : "#{@user.name}"), [:admin, @user]) %> <% end %> <% content_for :sidebar do %> <% if @user != current_user %>
Unchecking the This account is activated box will effectively disable logins.
<% end %> <% end %> <%= form_for([:admin, @user], html: { multipart: true }, builder: PagesCore::Admin::FormBuilder) do |f| %>Leave the password blank if you do not wish to change the password.
<% end %> <% if policy(@user).otp? %>Two-factor authentication has been enabled. <%= link_to("Disable", admin_otp_secret_path, class: :delete, method: :delete, data: { confirm: "Are you sure you want to disable 2FA?" }) %>
You have <%= t("pages_core.recovery_codes", count: @user.hashed_recovery_codes.length) %> remaining. <%= link_to("Generate new codes", new_admin_recovery_codes_path) %>
<% else %>Protect your account with an additional layer of security by requiring an authentication app to sign in.
<%= link_to("Enable 2FA", new_admin_otp_secret_path) %>
<% end %> <% end %> <%= render partial: "access_control", locals: { user: @user, f: f } %><% end %>