<commit_before><% @title = @user.name %>
<div class="page-header">
  <h1>
    <%= link_to_if current_user.system_admin?, "Users", users_path %> &middot; <%= @title %>
  </h1>
  <% if current_user.system_admin? %>
    <%= link_to "Edit User", edit_user_path(@user), class: 'btn btn-default btn-xs' %>
    <%= link_to 'Delete User', @user, method: :delete, class: 'btn btn-xs btn-danger-inverse', data: { confirm: "Are you sure you want to delete User #{@user.name}?" } unless current_user == @user %>
  <% end %>
</div>

<dl class="dl-horizontal">
  <dt>Email</dt>
  <dd><%= @user.email %></dd>

  <% if current_user.system_admin? %>
    <dt>Status</dt>
    <dd><%= @user.status %></dd>

    <dt>System Admin</dt>
    <dd><%= simple_check @user.system_admin? %></dd>
  <% end %>

  <dt>Projects</dt>
  <dd>
    <ul>
      <% @user.all_viewable_projects.each do |project| %>
        <% if current_user.all_viewable_projects.pluck(:id).include?(project.id) %>
          <li><%= link_to project.name, project %></li>
        <% end %>
      <% end %>
    </ul>
  </dd>

  <dt>Sites</dt>
  <dd>
    <ul>
      <% @user.all_viewable_sites.each do |site| %>
        <% if current_user.all_viewable_sites.pluck(:id).include?(site.id) %>
          <li><%= link_to "#{site.name} - #{site.project.name}", [site.project, site] %></li>
        <% end %>
      <% end %>
    </ul>
  </dd>

  <dt>User Avatar</dt>
  <dd><%= image_tag @user.avatar_url, class: 'img-rounded' %></dd>

  <% if @user.authentications.size > 0 %><commit_msg>Only show authentications if user is system_admin<commit_after><% @title = @user.name %>
<div class="page-header">
  <h1>
    <%= link_to_if current_user.system_admin?, "Users", users_path %> &middot; <%= @title %>
  </h1>
  <% if current_user.system_admin? %>
    <%= link_to "Edit User", edit_user_path(@user), class: 'btn btn-default btn-xs' %>
    <%= link_to 'Delete User', @user, method: :delete, class: 'btn btn-xs btn-danger-inverse', data: { confirm: "Are you sure you want to delete User #{@user.name}?" } unless current_user == @user %>
  <% end %>
</div>

<dl class="dl-horizontal">
  <dt>Email</dt>
  <dd><%= @user.email %></dd>

  <% if current_user.system_admin? %>
    <dt>Status</dt>
    <dd><%= @user.status %></dd>

    <dt>System Admin</dt>
    <dd><%= simple_check @user.system_admin? %></dd>
  <% end %>

  <dt>Projects</dt>
  <dd>
    <ul>
      <% @user.all_viewable_projects.each do |project| %>
        <% if current_user.all_viewable_projects.pluck(:id).include?(project.id) %>
          <li><%= link_to project.name, project %></li>
        <% end %>
      <% end %>
    </ul>
  </dd>

  <dt>Sites</dt>
  <dd>
    <ul>
      <% @user.all_viewable_sites.each do |site| %>
        <% if current_user.all_viewable_sites.pluck(:id).include?(site.id) %>
          <li><%= link_to "#{site.name} - #{site.project.name}", [site.project, site] %></li>
        <% end %>
      <% end %>
    </ul>
  </dd>

  <dt>User Avatar</dt>
  <dd><%= image_tag @user.avatar_url, class: 'img-rounded' %></dd>

  <% if current_user.system_admin? and @user.authentications.size > 0 %>
{'fraction_non_alphanumeric': 0.21628580624396523, 'fraction_numerical': 0.0019311232700354038, 'mean_word_length': 3.132978723404255, 'pattern_counts': {'":': 0, '<': 125, '<?xml version=': 0, '>': 127, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '749600', 'n_tokens_mistral': 1263, 'n_tokens_neox': 1156, 'n_words': 238}