diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-14 13:38:57 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-14 13:38:57 +0000 |
commit | 10e18de60f55811137871acefd331d2d5a41f237 (patch) | |
tree | b227511752fb7021acec83fd3b2b5499434ae7f8 /app | |
parent | 757327a59bcaecb986b0c07ae0cf09ed011e18ce (diff) | |
download | gitlab-ce-10e18de60f55811137871acefd331d2d5a41f237.tar.gz |
Add latest changes from gitlab-org/gitlab@13-12-stable-ee
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/projects/merge_requests/diffs_controller.rb | 5 | ||||
-rw-r--r-- | app/controllers/projects_controller.rb | 2 | ||||
-rw-r--r-- | app/models/application_setting_implementation.rb | 1 |
3 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/projects/merge_requests/diffs_controller.rb b/app/controllers/projects/merge_requests/diffs_controller.rb index 3eaabfbf33e..f125952cb97 100644 --- a/app/controllers/projects/merge_requests/diffs_controller.rb +++ b/app/controllers/projects/merge_requests/diffs_controller.rb @@ -163,7 +163,10 @@ class Projects::MergeRequests::DiffsController < Projects::MergeRequests::Applic end def render_merge_ref_head_diff? - Gitlab::Utils.to_boolean(params[:diff_head]) && @merge_request.diffable_merge_ref? && @start_sha.nil? + params[:diff_id].blank? && + Gitlab::Utils.to_boolean(params[:diff_head]) && + @merge_request.diffable_merge_ref? && + @start_sha.nil? end def note_positions diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index e66893ac269..fb977a5ee42 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -510,7 +510,7 @@ class ProjectsController < Projects::ApplicationController # `project` calls `find_routable!`, so this will trigger the usual not-found # behaviour when the user isn't authorized to see the project - return unless project + return if project.nil? || performed? redirect_to(request.original_url.sub(%r{\.git/?\Z}, '')) end diff --git a/app/models/application_setting_implementation.rb b/app/models/application_setting_implementation.rb index 5ff1c653f9e..bf9df3b9efc 100644 --- a/app/models/application_setting_implementation.rb +++ b/app/models/application_setting_implementation.rb @@ -374,6 +374,7 @@ module ApplicationSettingImplementation def usage_ping_enabled usage_ping_can_be_configured? && super end + alias_method :usage_ping_enabled?, :usage_ping_enabled def allowed_key_types SUPPORTED_KEY_TYPES.select do |type| |