<commit_before>@using Piranha.Manager
@inject ManagerLocalizer Localizer
@{
    var menu = Menu.Items;
}

<nav class="navbar navbar-left fixed-top navbar-dark bg-dark">
    <a class="navbar-brand" href="~/manager" tabindex="-1"></a>
    <ul class="navbar-nav">
        @foreach (var group in menu)
        {
            <li class="nav-item nav-header"><span class="navbar-text"><i class="@group.Css"></i>@Localizer.Menu[group.Name]</span></li>
            @foreach (var item in group.Items)
            {
                <li class="nav-item@(ViewBag.MenuItem == item.InternalId ? " active" :"")"><a href="@Url.Content(item.Route)" class="nav-link" tabindex="-1"><i class="@item.Css"></i>@Localizer.Menu[item.Name]</a></li>
            }
        }
        <li class="nav-item nav-header"><a class="navbar-text" href="~/manager/logout"><i class="fas fa-power-off"></i>@Localizer.Menu["Logout"]</a></li>
    </ul>
</nav>
<commit_msg>Fixed so manager menu rendering takes user permissions into account. See #756<commit_after>@using Piranha.Manager
@inject ManagerLocalizer Localizer
@inject IAuthorizationService Auth
@{
    var menu = await Menu.Items.GetForUser(User, Auth);
}

<nav class="navbar navbar-left fixed-top navbar-dark bg-dark">
    <a class="navbar-brand" href="~/manager" tabindex="-1"></a>
    <ul class="navbar-nav">
        @foreach (var group in menu)
        {
            <li class="nav-item nav-header"><span class="navbar-text"><i class="@group.Css"></i>@Localizer.Menu[group.Name]</span></li>
            @foreach (var item in group.Items)
            {
                <li class="nav-item@(ViewBag.MenuItem == item.InternalId ? " active" :"")"><a href="@Url.Content(item.Route)" class="nav-link" tabindex="-1"><i class="@item.Css"></i>@Localizer.Menu[item.Name]</a></li>
            }
        }
        <li class="nav-item nav-header"><a class="navbar-text" href="~/manager/logout"><i class="fas fa-power-off"></i>@Localizer.Menu["Logout"]</a></li>
    </ul>
</nav>

{'fraction_non_alphanumeric': 0.19969818913480886, 'fraction_numerical': 0.0035211267605633804, 'mean_word_length': 3.2774193548387096, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 51, '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': '6742522', 'n_tokens_mistral': 662, 'n_tokens_neox': 648, 'n_words': 122}