diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-28 17:00:40 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-29 16:11:10 -0800 |
commit | f7739358667cb9ab7ec0646df0931c5601db6179 (patch) | |
tree | 16fcfc114f759ff021302f52ccd6a4c1895a5cdc | |
parent | 7e2b71e0691dd775a869f52bc743948c9ec6ebbe (diff) | |
download | gitlab-ce-f7739358667cb9ab7ec0646df0931c5601db6179.tar.gz |
Be more careful with parsing changes from gitlab-shell
-rw-r--r-- | lib/gitlab/git_access.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb index d47ef61fd11..2ca829830d7 100644 --- a/lib/gitlab/git_access.rb +++ b/lib/gitlab/git_access.rb @@ -64,7 +64,7 @@ module Gitlab changes = changes.lines if changes.kind_of?(String) # Iterate over all changes to find if user allowed all of them to be applied - changes.each do |change| + changes.map(&:strip).reject(&:blank?).each do |change| status = change_access_check(user, project, change) unless status.allowed? # If user does not have access to make at least one change - cancel all push |