Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/admin/groups_controller.rb2
-rw-r--r--app/controllers/admin/projects_controller.rb2
-rw-r--r--app/controllers/admin/topics/avatars_controller.rb2
-rw-r--r--app/controllers/admin/topics_controller.rb6
-rw-r--r--app/controllers/autocomplete_controller.rb2
-rw-r--r--app/controllers/dashboard/groups_controller.rb2
-rw-r--r--app/controllers/dashboard/projects_controller.rb2
-rw-r--r--app/controllers/explore/groups_controller.rb2
-rw-r--r--app/controllers/explore/projects_controller.rb2
-rw-r--r--app/controllers/groups/autocomplete_sources_controller.rb2
-rw-r--r--app/controllers/groups/avatars_controller.rb2
-rw-r--r--app/controllers/groups/children_controller.rb2
-rw-r--r--app/controllers/groups/group_links_controller.rb2
-rw-r--r--app/controllers/groups/group_members_controller.rb2
-rw-r--r--app/controllers/groups/shared_projects_controller.rb2
-rw-r--r--app/controllers/groups/uploads_controller.rb2
-rw-r--r--app/controllers/groups_controller.rb6
-rw-r--r--app/controllers/projects/avatars_controller.rb2
-rw-r--r--app/controllers/projects/blame_controller.rb5
-rw-r--r--app/controllers/projects/group_links_controller.rb2
-rw-r--r--app/controllers/projects/project_members_controller.rb2
-rw-r--r--app/controllers/projects/redirect_controller.rb2
-rw-r--r--app/controllers/projects/starrers_controller.rb2
-rw-r--r--app/controllers/projects_controller.rb2
24 files changed, 33 insertions, 26 deletions
diff --git a/app/controllers/admin/groups_controller.rb b/app/controllers/admin/groups_controller.rb
index 0f9ecc60648..001f5242138 100644
--- a/app/controllers/admin/groups_controller.rb
+++ b/app/controllers/admin/groups_controller.rb
@@ -5,7 +5,7 @@ class Admin::GroupsController < Admin::ApplicationController
before_action :group, only: [:edit, :update, :destroy, :project_update, :members_update]
- feature_category :subgroups, [:create, :destroy, :edit, :index, :members_update, :new, :show, :update]
+ feature_category :groups_and_projects, [:create, :destroy, :edit, :index, :members_update, :new, :show, :update]
def index
@groups = groups.sort_by_attribute(@sort = params[:sort])
diff --git a/app/controllers/admin/projects_controller.rb b/app/controllers/admin/projects_controller.rb
index 84eb90ce334..e79a899cee7 100644
--- a/app/controllers/admin/projects_controller.rb
+++ b/app/controllers/admin/projects_controller.rb
@@ -6,7 +6,7 @@ class Admin::ProjectsController < Admin::ApplicationController
before_action :project, only: [:show, :transfer, :repository_check, :destroy, :edit, :update]
before_action :group, only: [:show, :transfer]
- feature_category :projects, [:index, :show, :transfer, :destroy, :edit, :update]
+ feature_category :groups_and_projects, [:index, :show, :transfer, :destroy, :edit, :update]
feature_category :source_code_management, [:repository_check]
def index
diff --git a/app/controllers/admin/topics/avatars_controller.rb b/app/controllers/admin/topics/avatars_controller.rb
index 7acdec424b4..ee0a7e68bb3 100644
--- a/app/controllers/admin/topics/avatars_controller.rb
+++ b/app/controllers/admin/topics/avatars_controller.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
class Admin::Topics::AvatarsController < Admin::ApplicationController
- feature_category :projects
+ feature_category :groups_and_projects
def destroy
@topic = Projects::Topic.find(params[:topic_id])
diff --git a/app/controllers/admin/topics_controller.rb b/app/controllers/admin/topics_controller.rb
index 94d084932ad..1f0664362a0 100644
--- a/app/controllers/admin/topics_controller.rb
+++ b/app/controllers/admin/topics_controller.rb
@@ -6,7 +6,11 @@ class Admin::TopicsController < Admin::ApplicationController
before_action :topic, only: [:edit, :update, :destroy]
- feature_category :projects
+ feature_category :groups_and_projects
+
+ before_action do
+ push_frontend_feature_flag(:content_editor_on_issues, current_user)
+ end
def index
@topics = Projects::TopicsFinder.new(params: params.permit(:search)).execute.page(params[:page]).without_count
diff --git a/app/controllers/autocomplete_controller.rb b/app/controllers/autocomplete_controller.rb
index 01cc1ef21c6..c9cb1ca14e2 100644
--- a/app/controllers/autocomplete_controller.rb
+++ b/app/controllers/autocomplete_controller.rb
@@ -7,7 +7,7 @@ class AutocompleteController < ApplicationController
before_action :check_search_rate_limit!, only: [:users, :projects]
feature_category :user_profile, [:users, :user]
- feature_category :projects, [:projects]
+ feature_category :groups_and_projects, [:projects]
feature_category :team_planning, [:award_emojis]
feature_category :code_review_workflow, [:merge_request_target_branches]
feature_category :continuous_delivery, [:deploy_keys_with_owners]
diff --git a/app/controllers/dashboard/groups_controller.rb b/app/controllers/dashboard/groups_controller.rb
index 552d74686d6..39bee37ee05 100644
--- a/app/controllers/dashboard/groups_controller.rb
+++ b/app/controllers/dashboard/groups_controller.rb
@@ -5,7 +5,7 @@ class Dashboard::GroupsController < Dashboard::ApplicationController
skip_cross_project_access_check :index
- feature_category :subgroups
+ feature_category :groups_and_projects
urgency :low, [:index]
diff --git a/app/controllers/dashboard/projects_controller.rb b/app/controllers/dashboard/projects_controller.rb
index e26ac083622..eee172995cf 100644
--- a/app/controllers/dashboard/projects_controller.rb
+++ b/app/controllers/dashboard/projects_controller.rb
@@ -14,7 +14,7 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
before_action :projects, only: [:index]
skip_cross_project_access_check :index, :starred
- feature_category :projects
+ feature_category :groups_and_projects
urgency :low, [:starred, :index]
def index
diff --git a/app/controllers/explore/groups_controller.rb b/app/controllers/explore/groups_controller.rb
index 96a7b5b144d..6cb0736d7ef 100644
--- a/app/controllers/explore/groups_controller.rb
+++ b/app/controllers/explore/groups_controller.rb
@@ -3,7 +3,7 @@
class Explore::GroupsController < Explore::ApplicationController
include GroupTree
- feature_category :subgroups
+ feature_category :groups_and_projects
urgency :low
def index
diff --git a/app/controllers/explore/projects_controller.rb b/app/controllers/explore/projects_controller.rb
index eebcbe88ebf..d065fff8a55 100644
--- a/app/controllers/explore/projects_controller.rb
+++ b/app/controllers/explore/projects_controller.rb
@@ -23,7 +23,7 @@ class Explore::ProjectsController < Explore::ApplicationController
rescue_from PageOutOfBoundsError, with: :page_out_of_bounds
- feature_category :projects
+ feature_category :groups_and_projects
# TODO: Set higher urgency after addressing https://gitlab.com/gitlab-org/gitlab/-/issues/357913
# and https://gitlab.com/gitlab-org/gitlab/-/issues/358945
urgency :low, [:index, :topics, :trending, :starred, :topic]
diff --git a/app/controllers/groups/autocomplete_sources_controller.rb b/app/controllers/groups/autocomplete_sources_controller.rb
index 3cad9e1fbad..414461d9e93 100644
--- a/app/controllers/groups/autocomplete_sources_controller.rb
+++ b/app/controllers/groups/autocomplete_sources_controller.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
class Groups::AutocompleteSourcesController < Groups::ApplicationController
- feature_category :subgroups, [:members]
+ feature_category :groups_and_projects, [:members]
feature_category :team_planning, [:issues, :labels, :milestones, :commands]
feature_category :code_review_workflow, [:merge_requests]
diff --git a/app/controllers/groups/avatars_controller.rb b/app/controllers/groups/avatars_controller.rb
index 1f13be449a9..3b34a1947ae 100644
--- a/app/controllers/groups/avatars_controller.rb
+++ b/app/controllers/groups/avatars_controller.rb
@@ -5,7 +5,7 @@ class Groups::AvatarsController < Groups::ApplicationController
skip_cross_project_access_check :destroy
- feature_category :subgroups
+ feature_category :groups_and_projects
def destroy
@group.remove_avatar!
diff --git a/app/controllers/groups/children_controller.rb b/app/controllers/groups/children_controller.rb
index ca3be1542aa..98d7487b21a 100644
--- a/app/controllers/groups/children_controller.rb
+++ b/app/controllers/groups/children_controller.rb
@@ -9,7 +9,7 @@ module Groups
skip_cross_project_access_check :index
- feature_category :subgroups
+ feature_category :groups_and_projects
# TODO: Set to higher urgency after resolving https://gitlab.com/gitlab-org/gitlab/-/issues/331494
urgency :low, [:index]
diff --git a/app/controllers/groups/group_links_controller.rb b/app/controllers/groups/group_links_controller.rb
index c74c48a960d..a874c7d164d 100644
--- a/app/controllers/groups/group_links_controller.rb
+++ b/app/controllers/groups/group_links_controller.rb
@@ -4,7 +4,7 @@ class Groups::GroupLinksController < Groups::ApplicationController
before_action :authorize_admin_group!
before_action :group_link, only: [:update, :destroy]
- feature_category :subgroups
+ feature_category :groups_and_projects
def update
Groups::GroupLinks::UpdateService.new(@group_link, current_user).execute(group_link_params)
diff --git a/app/controllers/groups/group_members_controller.rb b/app/controllers/groups/group_members_controller.rb
index d614cc1cb24..de47c5fb5e3 100644
--- a/app/controllers/groups/group_members_controller.rb
+++ b/app/controllers/groups/group_members_controller.rb
@@ -24,7 +24,7 @@ class Groups::GroupMembersController < Groups::ApplicationController
skip_cross_project_access_check :index, :update, :destroy, :request_access,
:approve_access_request, :leave, :resend_invite, :override
- feature_category :subgroups
+ feature_category :groups_and_projects
urgency :low
def index
diff --git a/app/controllers/groups/shared_projects_controller.rb b/app/controllers/groups/shared_projects_controller.rb
index 2d2664c02e8..73f951d6ce4 100644
--- a/app/controllers/groups/shared_projects_controller.rb
+++ b/app/controllers/groups/shared_projects_controller.rb
@@ -6,7 +6,7 @@ module Groups
before_action :group
skip_cross_project_access_check :index
- feature_category :subgroups
+ feature_category :groups_and_projects
urgency :low, [:index]
def index
diff --git a/app/controllers/groups/uploads_controller.rb b/app/controllers/groups/uploads_controller.rb
index 22e6549aa04..cd1ebc39411 100644
--- a/app/controllers/groups/uploads_controller.rb
+++ b/app/controllers/groups/uploads_controller.rb
@@ -9,7 +9,7 @@ class Groups::UploadsController < Groups::ApplicationController
before_action :authorize_upload_file!, only: [:create, :authorize]
before_action :verify_workhorse_api!, only: [:authorize]
- feature_category :subgroups
+ feature_category :groups_and_projects
urgency :low, [:show]
private
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb
index 182d7aee060..ec16be8f85e 100644
--- a/app/controllers/groups_controller.rb
+++ b/app/controllers/groups_controller.rb
@@ -52,14 +52,12 @@ class GroupsController < Groups::ApplicationController
layout :determine_layout
- feature_category :subgroups, [
+ feature_category :groups_and_projects, [
:index, :new, :create, :show, :edit, :update,
- :destroy, :details, :transfer, :activity
+ :destroy, :details, :transfer, :activity, :projects
]
-
feature_category :team_planning, [:issues, :issues_calendar, :preview_markdown]
feature_category :code_review_workflow, [:merge_requests, :unfoldered_environment_names]
- feature_category :projects, [:projects]
feature_category :importers, [:export, :download_export]
urgency :low, [:export, :download_export]
diff --git a/app/controllers/projects/avatars_controller.rb b/app/controllers/projects/avatars_controller.rb
index 5db7609e07a..3728406afd3 100644
--- a/app/controllers/projects/avatars_controller.rb
+++ b/app/controllers/projects/avatars_controller.rb
@@ -5,7 +5,7 @@ class Projects::AvatarsController < Projects::ApplicationController
before_action :authorize_admin_project!, only: [:destroy]
- feature_category :projects
+ feature_category :groups_and_projects
urgency :low, [:show]
diff --git a/app/controllers/projects/blame_controller.rb b/app/controllers/projects/blame_controller.rb
index bb1b8760c42..f621adbebc7 100644
--- a/app/controllers/projects/blame_controller.rb
+++ b/app/controllers/projects/blame_controller.rb
@@ -9,6 +9,7 @@ class Projects::BlameController < Projects::ApplicationController
before_action :assign_ref_vars
before_action :authorize_read_code!
before_action :load_blob
+ before_action :require_non_binary_blob
feature_category :source_code_management
urgency :low, [:show]
@@ -40,6 +41,10 @@ class Projects::BlameController < Projects::ApplicationController
redirect_to_tree_root_for_missing_path(@project, @ref, @path)
end
+ def require_non_binary_blob
+ redirect_to project_blob_path(@project, File.join(@ref, @path)), notice: _('Blame for binary files is not supported.') if @blob.binary?
+ end
+
def load_environment
environment_params = @repository.branch_exists?(@ref) ? { ref: @ref } : { commit: @commit }
environment_params[:find_latest] = true
diff --git a/app/controllers/projects/group_links_controller.rb b/app/controllers/projects/group_links_controller.rb
index 451f1d1363b..60300f78bbb 100644
--- a/app/controllers/projects/group_links_controller.rb
+++ b/app/controllers/projects/group_links_controller.rb
@@ -6,7 +6,7 @@ class Projects::GroupLinksController < Projects::ApplicationController
before_action :authorize_admin_project_group_link!, only: [:destroy]
before_action :authorize_admin_project_member!, only: [:update]
- feature_category :subgroups
+ feature_category :groups_and_projects
def update
Projects::GroupLinks::UpdateService.new(group_link, current_user).execute(group_link_params)
diff --git a/app/controllers/projects/project_members_controller.rb b/app/controllers/projects/project_members_controller.rb
index f4b96177b0f..5390df449e8 100644
--- a/app/controllers/projects/project_members_controller.rb
+++ b/app/controllers/projects/project_members_controller.rb
@@ -8,7 +8,7 @@ class Projects::ProjectMembersController < Projects::ApplicationController
# Authorize
before_action :authorize_admin_project_member!, except: [:index, :leave, :request_access]
- feature_category :projects
+ feature_category :groups_and_projects
urgency :low
def index
diff --git a/app/controllers/projects/redirect_controller.rb b/app/controllers/projects/redirect_controller.rb
index 6bcbe87ee42..c66a99be02b 100644
--- a/app/controllers/projects/redirect_controller.rb
+++ b/app/controllers/projects/redirect_controller.rb
@@ -6,7 +6,7 @@
class Projects::RedirectController < ::ApplicationController
skip_before_action :authenticate_user!
- feature_category :projects
+ feature_category :groups_and_projects
def redirect_from_id
project = Project.find(params[:id])
diff --git a/app/controllers/projects/starrers_controller.rb b/app/controllers/projects/starrers_controller.rb
index 06996e8e5fc..f9f71ce72d3 100644
--- a/app/controllers/projects/starrers_controller.rb
+++ b/app/controllers/projects/starrers_controller.rb
@@ -3,7 +3,7 @@
class Projects::StarrersController < Projects::ApplicationController
include SortingHelper
- feature_category :projects
+ feature_category :groups_and_projects
urgency :low, [:index]
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index a612c1e89a5..4fa7faa9094 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -50,7 +50,7 @@ class ProjectsController < Projects::ApplicationController
layout :determine_layout
- feature_category :projects, [
+ feature_category :groups_and_projects, [
:index, :show, :new, :create, :edit, :update, :transfer,
:destroy, :archive, :unarchive, :toggle_star, :activity
]