<%== erb :'admin/_nav', layout: false %>

Users

<% if can?('users', 'write') %>+ New user ยท <% end %>audit log

<% if @flash %>
<%= @flash %>
<% end %> <% if @link %>

<%= @link['kind'] == 'invite' ? 'Invite' : 'Password reset' %> link<%= @link['sent'] ? " emailed to #{@link['to']}" : (@link['to'] ? " โ€” email to #{@link['to']} FAILED, send it yourself" : ' (no email on file โ€” send it yourself)') %>. Shown once; it works once and expires in <%= @link['kind'] == 'invite' ? '48 hours' : '1 hour' %>:

<%= @link['url'] %>

<% end %>
<% @users.each do |u| %> <% end %>
UserAccessStatusLast login
<%= u.username %><% if u.name.to_s != '' %>
<%= u.name %><% end %><% if u.email %>
<%= u.email %><% end %>
<%= perm_summary(u) %> <% if !u.active %>disabled <% elsif !u.password_digest %>invited<% if u.choose_username %>
picks own username<% end %> <% else %>active<% end %>
<%= u.last_login_at&.strftime('%Y-%m-%d %H:%M') || 'โ€”' %> <%= can?('users', 'write') ? 'edit' : 'view' %>