summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-31 18:07:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-31 18:07:42 +0000
commit580622bdb3c762a8e89facd8a3946881ee480442 (patch)
tree3ac9d759da23f78f95f50684bd238a9f76839538 /app/controllers
parentb211a4ea14d5e9ed9b0c248a4e8c5c1d85b542cb (diff)
downloadgitlab-ce-580622bdb3c762a8e89facd8a3946881ee480442.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/boards/issues_controller.rb2
-rw-r--r--app/controllers/concerns/snippets_actions.rb8
-rw-r--r--app/controllers/groups/registry/repositories_controller.rb13
-rw-r--r--app/controllers/projects/registry/repositories_controller.rb6
4 files changed, 12 insertions, 17 deletions
diff --git a/app/controllers/boards/issues_controller.rb b/app/controllers/boards/issues_controller.rb
index ccb9dd7bbf6..1bfff210ecf 100644
--- a/app/controllers/boards/issues_controller.rb
+++ b/app/controllers/boards/issues_controller.rb
@@ -21,7 +21,7 @@ module Boards
before_action :validate_id_list, only: [:bulk_move]
before_action :can_move_issues?, only: [:bulk_move]
before_action do
- push_frontend_feature_flag(:board_search_optimization, board.group)
+ push_frontend_feature_flag(:board_search_optimization, board.group, default_enabled: true)
end
def index
diff --git a/app/controllers/concerns/snippets_actions.rb b/app/controllers/concerns/snippets_actions.rb
index b12aee346ed..096c6efc0fc 100644
--- a/app/controllers/concerns/snippets_actions.rb
+++ b/app/controllers/concerns/snippets_actions.rb
@@ -4,6 +4,10 @@ module SnippetsActions
extend ActiveSupport::Concern
include SendsBlob
+ included do
+ before_action :redirect_if_binary, only: [:edit, :update]
+ end
+
def edit
# We need to load some info from the existing blob
snippet.content = blob.data
@@ -67,4 +71,8 @@ module SnippetsActions
flash.now[:alert] = repository_errors.first if repository_errors.present?
recaptcha_check_with_fallback(repository_errors.empty?) { render :edit }
end
+
+ def redirect_if_binary
+ redirect_to gitlab_snippet_path(snippet) if blob&.binary?
+ end
end
diff --git a/app/controllers/groups/registry/repositories_controller.rb b/app/controllers/groups/registry/repositories_controller.rb
index ac4ca197d72..0240c87e699 100644
--- a/app/controllers/groups/registry/repositories_controller.rb
+++ b/app/controllers/groups/registry/repositories_controller.rb
@@ -4,7 +4,6 @@ module Groups
class RepositoriesController < Groups::ApplicationController
before_action :verify_container_registry_enabled!
before_action :authorize_read_container_image!
- before_action :feature_flag_group_container_registry_browser!
def index
respond_to do |format|
@@ -17,12 +16,8 @@ module Groups
serializer = ContainerRepositoriesSerializer
.new(current_user: current_user)
- if Feature.enabled?(:vue_container_registry_explorer, group)
- render json: serializer.with_pagination(request, response)
- .represent_read_only(@images)
- else
- render json: serializer.represent_read_only(@images)
- end
+ render json: serializer.with_pagination(request, response)
+ .represent_read_only(@images)
end
end
end
@@ -34,10 +29,6 @@ module Groups
private
- def feature_flag_group_container_registry_browser!
- render_404 unless Feature.enabled?(:group_container_registry_browser, group)
- end
-
def verify_container_registry_enabled!
render_404 unless Gitlab.config.registry.enabled
end
diff --git a/app/controllers/projects/registry/repositories_controller.rb b/app/controllers/projects/registry/repositories_controller.rb
index d6d993f427d..8852ae04d5e 100644
--- a/app/controllers/projects/registry/repositories_controller.rb
+++ b/app/controllers/projects/registry/repositories_controller.rb
@@ -17,11 +17,7 @@ module Projects
serializer = ContainerRepositoriesSerializer
.new(project: project, current_user: current_user)
- if Feature.enabled?(:vue_container_registry_explorer, project.group)
- render json: serializer.with_pagination(request, response).represent(@images)
- else
- render json: serializer.represent(@images)
- end
+ render json: serializer.with_pagination(request, response).represent(@images)
end
end
end