diff options
Diffstat (limited to 'app/controllers')
5 files changed, 18 insertions, 14 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 26ef6117e1c..b5695322eb6 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -497,7 +497,7 @@ class ApplicationController < ActionController::Base end def public_visibility_restricted? - Gitlab::CurrentSettings.restricted_visibility_levels.include? Gitlab::VisibilityLevel::PUBLIC + Gitlab::VisibilityLevel.public_visibility_restricted? end def set_usage_stats_consent_flag diff --git a/app/controllers/projects/deploy_keys_controller.rb b/app/controllers/projects/deploy_keys_controller.rb index f43e9f2bd19..761225e897f 100644 --- a/app/controllers/projects/deploy_keys_controller.rb +++ b/app/controllers/projects/deploy_keys_controller.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true class Projects::DeployKeysController < Projects::ApplicationController + include RepositorySettingsRedirect respond_to :html # Authorize @@ -11,7 +12,7 @@ class Projects::DeployKeysController < Projects::ApplicationController def index respond_to do |format| - format.html { redirect_to_ci_cd_settings } + format.html { redirect_to_repository } format.json do render json: Projects::Settings::DeployKeysPresenter.new(@project, current_user: current_user).as_json end @@ -19,7 +20,7 @@ class Projects::DeployKeysController < Projects::ApplicationController end def new - redirect_to_ci_cd_settings + redirect_to_repository end def create @@ -29,7 +30,7 @@ class Projects::DeployKeysController < Projects::ApplicationController flash[:alert] = @key.errors.full_messages.join(', ').html_safe end - redirect_to_ci_cd_settings + redirect_to_repository end def edit @@ -38,7 +39,7 @@ class Projects::DeployKeysController < Projects::ApplicationController def update if deploy_key.update(update_params) flash[:notice] = _('Deploy key was successfully updated.') - redirect_to_ci_cd_settings + redirect_to_repository else render 'edit' end @@ -50,7 +51,7 @@ class Projects::DeployKeysController < Projects::ApplicationController return render_404 unless key respond_to do |format| - format.html { redirect_to_ci_cd_settings } + format.html { redirect_to_repository } format.json { head :ok } end end @@ -61,7 +62,7 @@ class Projects::DeployKeysController < Projects::ApplicationController return render_404 unless deploy_key_project respond_to do |format| - format.html { redirect_to_ci_cd_settings } + format.html { redirect_to_repository } format.json { head :ok } end end @@ -97,7 +98,9 @@ class Projects::DeployKeysController < Projects::ApplicationController end end - def redirect_to_ci_cd_settings - redirect_to project_settings_ci_cd_path(@project, anchor: 'js-deploy-keys-settings') + private + + def redirect_to_repository + redirect_to_repository_settings(@project, anchor: 'js-deploy-keys-settings') end end diff --git a/app/controllers/projects/refs_controller.rb b/app/controllers/projects/refs_controller.rb index b4ca9074ca9..7c606bd8c45 100644 --- a/app/controllers/projects/refs_controller.rb +++ b/app/controllers/projects/refs_controller.rb @@ -11,6 +11,10 @@ class Projects::RefsController < Projects::ApplicationController before_action :assign_ref_vars before_action :authorize_download_code! + before_action only: [:logs_tree] do + push_frontend_feature_flag(:vue_file_list_lfs_badge) + end + def switch respond_to do |format| format.html do diff --git a/app/controllers/projects/settings/ci_cd_controller.rb b/app/controllers/projects/settings/ci_cd_controller.rb index c4d291e8634..d0d100fd88c 100644 --- a/app/controllers/projects/settings/ci_cd_controller.rb +++ b/app/controllers/projects/settings/ci_cd_controller.rb @@ -88,7 +88,6 @@ module Projects define_triggers_variables define_badges_variables define_auto_devops_variables - define_deploy_keys end def define_runners_variables @@ -135,10 +134,6 @@ module Projects def define_auto_devops_variables @auto_devops = @project.auto_devops || ProjectAutoDevops.new end - - def define_deploy_keys - @deploy_keys = DeployKeysPresenter.new(@project, current_user: current_user) - end end end end diff --git a/app/controllers/projects/settings/repository_controller.rb b/app/controllers/projects/settings/repository_controller.rb index 68bab952217..0aa55dcc5b9 100644 --- a/app/controllers/projects/settings/repository_controller.rb +++ b/app/controllers/projects/settings/repository_controller.rb @@ -63,6 +63,8 @@ module Projects end def define_variables + @deploy_keys = DeployKeysPresenter.new(@project, current_user: current_user) + define_deploy_token_variables define_protected_refs remote_mirror |