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