<commit_before><nav class="mod-navi current-navi">
  <h2><%= link_to @cur_site.menu_portal_label || t('modules.gws/portal'), "#{gws_portal_path}/", class: "icon-portal" %></h2>
  <h3><%= link_to t('gws/portal.self_portal'), gws_portal_user_path(user: @cur_user.id), class: "icon-portal" %></h3>

  <% @cur_user.groups.in_group(@cur_site).each do |group| %>
    <% next if group.id == @cur_site.id %>
    <h3><%= link_to group.trailing_name, gws_portal_group_path(group: group) %></h3>
  <% end %>
  <h3><%= link_to t('gws/portal.tabs.root_portal'), gws_portal_group_path(group: @cur_site) %></h3>

  <% if Gws::Portal::UserSetting.allowed?(:read, @cur_user, site: @cur_site) %>
    <h3><%= link_to t('gws/portal.user_portal'), gws_portal_setting_users_path %></h3>
  <% end %>
  <% if Gws::Portal::GroupSetting.allowed?(:read, @cur_user, site: @cur_site) %>
    <h3><%= link_to t('gws/portal.group_portal'), gws_portal_setting_groups_path %></h3>
  <% end %>

  <% if params[:group].present? %>
    <% if @portal.allowed?(:edit, @cur_user, site: @cur_site, strict: true) %>
      <h2><%= @portal.portal_group.trailing_name %></h2>
      <h3><%= link_to t("gws/portal.links.arrange_portlets"), gws_portal_group_layouts_path, class: "management" %></h3>
      <h3><%= link_to t("gws/portal.links.manage_portlets"), gws_portal_group_portlets_path, class: "management" %></h3>
      <h3><%= link_to t("gws/portal.links.settings"), gws_portal_group_settings_path, class: "management" %></h3>
    <% end %>
  <% end %>

  <% if params[:user].present? %>
    <h2><%= @portal.portal_user.name %></h2>
    <h3><%= link_to t("gws/portal.links.arrange_portlets"), gws_portal_user_layouts_path, class: "management" %></h3>
    <h3><%= link_to t("gws/portal.links.manage_portlets"), gws_portal_user_portlets_path, class: "management" %></h3>
    <h3><%= link_to t("gws/portal.links.settings"), gws_portal_user_settings_path, class: "management" %></h3>
  <% end %>
</nav>

<%= render partial: 'gws/main/navi' %><commit_msg>[fix] gws/menu : user portal portlets 403 (#1951)<commit_after><nav class="mod-navi current-navi">
  <h2><%= link_to @cur_site.menu_portal_label || t('modules.gws/portal'), "#{gws_portal_path}/", class: "icon-portal" %></h2>
  <h3><%= link_to t('gws/portal.self_portal'), gws_portal_user_path(user: @cur_user.id), class: "icon-portal" %></h3>

  <% @cur_user.groups.in_group(@cur_site).each do |group| %>
    <% next if group.id == @cur_site.id %>
    <h3><%= link_to group.trailing_name, gws_portal_group_path(group: group) %></h3>
  <% end %>
  <h3><%= link_to t('gws/portal.tabs.root_portal'), gws_portal_group_path(group: @cur_site) %></h3>

  <% if Gws::Portal::UserSetting.allowed?(:read, @cur_user, site: @cur_site) %>
    <h3><%= link_to t('gws/portal.user_portal'), gws_portal_setting_users_path %></h3>
  <% end %>
  <% if Gws::Portal::GroupSetting.allowed?(:read, @cur_user, site: @cur_site) %>
    <h3><%= link_to t('gws/portal.group_portal'), gws_portal_setting_groups_path %></h3>
  <% end %>

  <% if params[:group].present? %>
    <% if @portal.allowed?(:edit, @cur_user, site: @cur_site, strict: true) %>
      <h2><%= @portal.portal_group.trailing_name %></h2>
      <h3><%= link_to t("gws/portal.links.arrange_portlets"), gws_portal_group_layouts_path, class: "management" %></h3>
      <h3><%= link_to t("gws/portal.links.manage_portlets"), gws_portal_group_portlets_path, class: "management" %></h3>
      <h3><%= link_to t("gws/portal.links.settings"), gws_portal_group_settings_path, class: "management" %></h3>
    <% end %>
  <% end %>

  <% if params[:user].present? %>
    <% if @portal.allowed?(:edit, @cur_user, site: @cur_site, strict: true) %>
      <h2><%= @portal.portal_user.name %></h2>
      <h3><%= link_to t("gws/portal.links.arrange_portlets"), gws_portal_user_layouts_path, class: "management" %></h3>
      <h3><%= link_to t("gws/portal.links.manage_portlets"), gws_portal_user_portlets_path, class: "management" %></h3>
      <h3><%= link_to t("gws/portal.links.settings"), gws_portal_user_settings_path, class: "management" %></h3>
    <% end %>
  <% end %>
</nav>

<%= render partial: 'gws/main/navi' %>
{'fraction_non_alphanumeric': 0.2126533557854222, 'fraction_numerical': 0.015155159971133028, 'mean_word_length': 5.150887573964497, 'pattern_counts': {'":': 0, '<': 121, '<?xml version=': 0, '>': 121, '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': '5615538', 'n_tokens_mistral': 1738, 'n_tokens_neox': 1700, 'n_words': 268}