diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-04 10:03:30 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-04 10:03:30 +0000 |
commit | d35df0ad158c14cb28f583f4b26c4196ef23a3f7 (patch) | |
tree | 5a1992758772519104eacb5de2c231721876541c /app/controllers/projects | |
parent | 3c51da6f5782e53123a7ed5af98ba0828cbfa49f (diff) | |
download | gitlab-ce-d35df0ad158c14cb28f583f4b26c4196ef23a3f7.tar.gz |
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'app/controllers/projects')
4 files changed, 17 insertions, 13 deletions
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 |