<commit_before><!DOCTYPE html>
<html>
    <head>
        <title>TOT2</title>
        <%= stylesheet_link_tag    "application", :media => "all" %>
        <%= javascript_include_tag "application" %>
        <%= csrf_meta_tags %>
    </head>
<body>

<div class="navbar navbar-fixed-top">
    <div class="navbar-inner">
        <div class="container">
            <a class="brand" href="/">TOT2</a>
            <a class="brand" href="/admin">admin</a>

            <% if can? :manage, @user %>
                <ul class="nav">
                    <li><p>&nbsp;&nbsp;&nbsp;&nbsp;</p></li>
                </ul>

                <ul class="nav">
                    <li <%= "class=active" if action_name == 'apps' %>><a href="/admin/apps">Apps</a></li>
                </ul>

                <ul class="nav">
                    <li <%= "class=active" if action_name == 'upload' %>><a href="/admin/upload">Upload</a></li>
                </ul>

                <ul class="nav">
                    <li <%= "class=active" if action_name == 'users' %>><a href="/admin/users">Users</a></li>
                </ul>
            <% end %>

            <p class="navbar-text pull-right">
            <% if user_signed_in? %>
                Logged in as <strong><%= current_user.email %></strong>.
                <%= link_to 'Edit profile', edit_user_registration_path, :class => 'navbar-link' %> |
                <%= link_to "Logout", destroy_user_session_path, method: :delete, :class => 'navbar-link'  %>
            <% else %>
                <%= link_to "Sign up", new_user_registration_path, :class => 'navbar-link'  %> |
                <%= link_to "Login", new_user_session_path, :class => 'navbar-link'  %>
            <% end %>
        </div>
    </div>
</div>

<div class="container">

    <% if notice %>
    <p class="alert alert-notice"><%= notice %></p>
    <% end %>
    <% if alert %><commit_msg>added permission check of navigation items<commit_after><!DOCTYPE html>
<html>
    <head>
        <title>TOT2</title>
        <%= stylesheet_link_tag    "application", :media => "all" %>
        <%= javascript_include_tag "application" %>
        <%= csrf_meta_tags %>
    </head>
<body>

<div class="navbar navbar-fixed-top">
    <div class="navbar-inner">
        <div class="container">
            <a class="brand" href="/">TOT2</a>
            <a class="brand" href="/admin">admin</a>

             <% if can? :manage, @app %>
                <ul class="nav">
                    <li><p>&nbsp;&nbsp;&nbsp;&nbsp;</p></li>
                </ul>

                <ul class="nav">
                    <li <%= "class=active" if action_name == 'apps' %>><a href="/admin/apps">Apps</a></li>
                </ul>

                <ul class="nav">
                    <li <%= "class=active" if action_name == 'upload' %>><a href="/admin/upload">Upload</a></li>
                </ul>
            <% end %>

             <% if can? :manage, @user %>
                <ul class="nav">
                    <li <%= "class=active" if action_name == 'users' %>><a href="/admin/users">Users</a></li>
                </ul>
            <% end %>

            <p class="navbar-text pull-right">
            <% if user_signed_in? %>
                Logged in as <strong><%= current_user.email %></strong>.
                <%= link_to 'Edit profile', edit_user_registration_path, :class => 'navbar-link' %> |
                <%= link_to "Logout", destroy_user_session_path, method: :delete, :class => 'navbar-link'  %>
            <% else %>
                <%= link_to "Sign up", new_user_registration_path, :class => 'navbar-link'  %> |
                <%= link_to "Login", new_user_session_path, :class => 'navbar-link'  %>
            <% end %>
        </div>
    </div>
</div>

<div class="container">

    <% if notice %>
    <p class="alert alert-notice"><%= notice %></p>
    <% end %>
    <% if alert %>
{'fraction_non_alphanumeric': 0.19142930459327687, 'fraction_numerical': 0.0010264305876315114, 'mean_word_length': 1.7862759113652609, 'pattern_counts': {'":': 0, '<': 139, '<?xml version=': 0, '>': 149, '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': '7134839', 'n_tokens_mistral': 1321, 'n_tokens_neox': 1168, 'n_words': 246}