Commit 41096704 authored by Rubén Dávila's avatar Rubén Dávila

Fix clonflicts for lib/gitlab/git_access.rb and spec/lib/gitlab/git_access_spec.rb

parent 359cfcc7
...@@ -2,12 +2,9 @@ ...@@ -2,12 +2,9 @@
# class return an instance of `GitlabAccessStatus` # class return an instance of `GitlabAccessStatus`
module Gitlab module Gitlab
class GitAccess class GitAccess
<<<<<<< HEAD
prepend ::EE::Gitlab::GitAccess prepend ::EE::Gitlab::GitAccess
include ActionView::Helpers::SanitizeHelper include ActionView::Helpers::SanitizeHelper
include PathLocksHelper include PathLocksHelper
=======
>>>>>>> upstream/master
include Gitlab::Utils::StrongMemoize include Gitlab::Utils::StrongMemoize
UnauthorizedError = Class.new(StandardError) UnauthorizedError = Class.new(StandardError)
...@@ -228,10 +225,7 @@ module Gitlab ...@@ -228,10 +225,7 @@ module Gitlab
end end
end end
<<<<<<< HEAD
# TODO: please clean this up # TODO: please clean this up
=======
>>>>>>> upstream/master
def check_push_access! def check_push_access!
if project.repository_read_only? if project.repository_read_only?
raise UnauthorizedError, ERROR_MESSAGES[:read_only] raise UnauthorizedError, ERROR_MESSAGES[:read_only]
...@@ -249,7 +243,6 @@ module Gitlab ...@@ -249,7 +243,6 @@ module Gitlab
return if changes.blank? # Allow access this is needed for EE. return if changes.blank? # Allow access this is needed for EE.
<<<<<<< HEAD
if check_size_limit? && project.above_size_limit? if check_size_limit? && project.above_size_limit?
raise UnauthorizedError, Gitlab::RepositorySizeError.new(project).push_error raise UnauthorizedError, Gitlab::RepositorySizeError.new(project).push_error
end end
...@@ -259,8 +252,6 @@ module Gitlab ...@@ -259,8 +252,6 @@ module Gitlab
raise UnauthorizedError, strip_tags(message) raise UnauthorizedError, strip_tags(message)
end end
=======
>>>>>>> upstream/master
check_change_access! check_change_access!
end end
...@@ -270,11 +261,8 @@ module Gitlab ...@@ -270,11 +261,8 @@ module Gitlab
# clear stale lock files. # clear stale lock files.
project.repository.clean_stale_repository_files project.repository.clean_stale_repository_files
<<<<<<< HEAD
push_size_in_bytes = 0 push_size_in_bytes = 0
=======
>>>>>>> upstream/master
# Iterate over all changes to find if user allowed all of them to be applied # Iterate over all changes to find if user allowed all of them to be applied
changes_list.each.with_index do |change, index| changes_list.each.with_index do |change, index|
first_change = index == 0 first_change = index == 0
...@@ -381,7 +369,6 @@ module Gitlab ...@@ -381,7 +369,6 @@ module Gitlab
protected protected
<<<<<<< HEAD
def check_size_limit? def check_size_limit?
strong_memoize(:check_size_limit) do strong_memoize(:check_size_limit) do
changes_list.any? do |change| changes_list.any? do |change|
...@@ -390,8 +377,6 @@ module Gitlab ...@@ -390,8 +377,6 @@ module Gitlab
end end
end end
=======
>>>>>>> upstream/master
def changes_list def changes_list
@changes_list ||= Gitlab::ChangesList.new(changes) @changes_list ||= Gitlab::ChangesList.new(changes)
end end
......
...@@ -779,7 +779,6 @@ describe Gitlab::GitAccess do ...@@ -779,7 +779,6 @@ describe Gitlab::GitAccess do
aggregate_failures do aggregate_failures do
matrix.each do |action, allowed| matrix.each do |action, allowed|
check = -> { push_changes(changes[action]) } check = -> { push_changes(changes[action]) }
<<<<<<< HEAD
if allowed if allowed
expect(&check).not_to raise_error, expect(&check).not_to raise_error,
...@@ -805,8 +804,6 @@ describe Gitlab::GitAccess do ...@@ -805,8 +804,6 @@ describe Gitlab::GitAccess do
aggregate_failures do aggregate_failures do
matrix.each do |action, allowed| matrix.each do |action, allowed|
check = -> { push_changes(changes[action]) } check = -> { push_changes(changes[action]) }
=======
>>>>>>> upstream/master
if allowed if allowed
expect(&check).not_to raise_error, expect(&check).not_to raise_error,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment