<commit_before>- is_admin_or_manager = current_visitor.has_role?('admin', 'manager')
- is_admin_or_project_admin = is_admin_or_manager || current_visitor.is_project_admin?
- is_admin_or_project_admin_or_project_researcher = is_admin_or_project_admin || current_visitor.is_project_researcher?

%h2
  Administration and Reports

%div{ class: 'admin-links-cols' }
  - if is_admin_or_manager
    %div{ class: 'admin-links-cols__column' }
      %h3
        Site Admin Links
      %ul
        %li= link_to 'Auth Clients', admin_clients_path
        %li= link_to 'Authoring Sites', admin_authoring_sites_path
        %li= link_to 'Districts', portal_districts_path
        %li= link_to 'External Reports', admin_external_reports_path
        %li= link_to 'Firebase Apps', admin_firebase_apps_path
        %li= link_to 'Import Schools and Districts' , import_school_district_status_import_imports_path
        %li= link_to 'Import Users' , import_user_status_import_imports_path
        %li= link_to 'Import Activities(Batch)' ,batch_import_status_import_imports_path
        %li= link_to 'Interactives' , interactives_path
        %li= link_to 'Learner processing wait times' ,learner_proc_path
        %li= link_to 'Licenses', admin_commons_licenses_path
        %li= link_to 'Materials Collections', materials_collections_path
        %li= link_to 'Notices', admin_site_notices_path
        %li= link_to 'Projects', admin_projects_path
        %li= link_to 'Schools', portal_schools_path
        %li= link_to 'Settings', admin_settings_path
        %li= link_to 'Tags', admin_tags_path
        %li= link_to 'Tools', admin_tools_path
        %li= link_to 'Users', users_path
  - if is_admin_or_project_admin_or_project_researcher
    %div{ class: 'admin-links-cols__column' }
      %h3
        Project Admin & Authoring Links
      %ul
        - if current_visitor.has_role?('admin', 'manager', 'researcher', 'author')
          %li.trail=link_to('Authoring', authoring_path)
        %li= link_to 'Permission Forms', admin_permission_forms_path
        - if is_admin_or_project_admin
          %li= link_to 'Projects', admin_projects_path
          %li= link_to 'Users', users_path

      - if current_visitor.has_role?('admin', 'manager','researcher') || current_visitor.is_project_admin? || current_visitor.is_project_researcher?
        %h3 Researcher Reports
        %ul
          - if ENV['RESEARCHER_REPORT_HOST'].present?
            %li= link_to 'Learner Reports', "#{ENV['RESEARCHER_REPORT_HOST']}#{auth_login_path(after_sign_in_path: learner_report_path)}",
                                  target: "_blank"
            %li= link_to 'User Reports', "#{ENV['RESEARCHER_REPORT_HOST']}#{auth_login_path(after_sign_in_path: user_report_path)}",
                                  target: "_blank"
          - else
            %li= link_to 'Learner Reports', learner_report_path
            %li= link_to 'User Reports', user_report_path
<commit_msg>Allow author only accounts to see authoring links<commit_after>- is_admin_or_manager = current_visitor.has_role?('admin', 'manager')
- is_admin_or_project_admin = is_admin_or_manager || current_visitor.is_project_admin?
- is_admin_or_project_admin_or_project_researcher = is_admin_or_project_admin || current_visitor.is_project_researcher?

%h2
  Administration and Reports

%div{ class: 'admin-links-cols' }
  - if is_admin_or_manager
    %div{ class: 'admin-links-cols__column' }
      %h3
        Site Admin Links
      %ul
        %li= link_to 'Auth Clients', admin_clients_path
        %li= link_to 'Authoring Sites', admin_authoring_sites_path
        %li= link_to 'Districts', portal_districts_path
        %li= link_to 'External Reports', admin_external_reports_path
        %li= link_to 'Firebase Apps', admin_firebase_apps_path
        %li= link_to 'Import Schools and Districts' , import_school_district_status_import_imports_path
        %li= link_to 'Import Users' , import_user_status_import_imports_path
        %li= link_to 'Import Activities(Batch)' ,batch_import_status_import_imports_path
        %li= link_to 'Interactives' , interactives_path
        %li= link_to 'Learner processing wait times' ,learner_proc_path
        %li= link_to 'Licenses', admin_commons_licenses_path
        %li= link_to 'Materials Collections', materials_collections_path
        %li= link_to 'Notices', admin_site_notices_path
        %li= link_to 'Projects', admin_projects_path
        %li= link_to 'Schools', portal_schools_path
        %li= link_to 'Settings', admin_settings_path
        %li= link_to 'Tags', admin_tags_path
        %li= link_to 'Tools', admin_tools_path
        %li= link_to 'Users', users_path

  %div{ class: 'admin-links-cols__column' }
    %h3
      Project Admin & Authoring Links
    %ul
      - if current_visitor.has_role?('admin', 'manager', 'researcher', 'author')
        %li.trail=link_to('Authoring', authoring_path)
      - if is_admin_or_project_admin_or_project_researcher
        %li= link_to 'Permission Forms', admin_permission_forms_path
      - if is_admin_or_project_admin
        %li= link_to 'Projects', admin_projects_path
        %li= link_to 'Users', users_path

    - if current_visitor.has_role?('admin', 'manager','researcher') || current_visitor.is_project_admin? || current_visitor.is_project_researcher?
      %h3 Researcher Reports
      %ul
        - if ENV['RESEARCHER_REPORT_HOST'].present?
          %li= link_to 'Learner Reports', "#{ENV['RESEARCHER_REPORT_HOST']}#{auth_login_path(after_sign_in_path: learner_report_path)}",
                                target: "_blank"
          %li= link_to 'User Reports', "#{ENV['RESEARCHER_REPORT_HOST']}#{auth_login_path(after_sign_in_path: user_report_path)}",
                                target: "_blank"
        - else
          %li= link_to 'Learner Reports', learner_report_path
          %li= link_to 'User Reports', user_report_path

{'fraction_non_alphanumeric': 0.09632016279464134, 'fraction_numerical': 0.0013566220111921317, 'mean_word_length': 3.5898832684824904, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5299595', 'n_tokens_mistral': 1960, 'n_tokens_neox': 1912, 'n_words': 381}