summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-26 18:09:24 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-26 18:09:24 +0000
commit619d0b6922a6cf95d291fbbf5fa3d09e772a1ea8 (patch)
treefb8f8e036cec1b32166206bb5102af6c5dca8cfe /app/controllers
parent17ab40ca089e1aef61a83f77ab6df62a72f6ce06 (diff)
downloadgitlab-ce-619d0b6922a6cf95d291fbbf5fa3d09e772a1ea8.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects/commits_controller.rb3
-rw-r--r--app/controllers/repositories/git_http_controller.rb2
2 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/projects/commits_controller.rb b/app/controllers/projects/commits_controller.rb
index 15bb35dd0be..b161e44660e 100644
--- a/app/controllers/projects/commits_controller.rb
+++ b/app/controllers/projects/commits_controller.rb
@@ -64,10 +64,13 @@ class Projects::CommitsController < Projects::ApplicationController
render_404 unless @path.empty? || request.format == :atom || @repository.blob_at(@commit.id, @path) || @repository.tree(@commit.id, @path).entries.present?
@limit, @offset = (params[:limit] || 40).to_i, (params[:offset] || 0).to_i
search = params[:search]
+ author = params[:author]
@commits =
if search.present?
@repository.find_commits_by_message(search, @ref, @path, @limit, @offset)
+ elsif author.present?
+ @repository.commits(@ref, author: author, path: @path, limit: @limit, offset: @offset)
else
@repository.commits(@ref, path: @path, limit: @limit, offset: @offset)
end
diff --git a/app/controllers/repositories/git_http_controller.rb b/app/controllers/repositories/git_http_controller.rb
index 75c79881264..5c2b6089bff 100644
--- a/app/controllers/repositories/git_http_controller.rb
+++ b/app/controllers/repositories/git_http_controller.rb
@@ -7,7 +7,7 @@ module Repositories
before_action :access_check
prepend_before_action :deny_head_requests, only: [:info_refs]
- rescue_from Gitlab::GitAccess::UnauthorizedError, with: :render_403_with_exception
+ rescue_from Gitlab::GitAccess::ForbiddenError, with: :render_403_with_exception
rescue_from Gitlab::GitAccess::NotFoundError, with: :render_404_with_exception
rescue_from Gitlab::GitAccess::ProjectCreationError, with: :render_422_with_exception
rescue_from Gitlab::GitAccess::TimeoutError, with: :render_503_with_exception