Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2017-05-23 22:21:57 +0300
committerMichael Kozono <mkozono@gmail.com>2017-06-05 15:32:26 +0300
commit0e3cfc75a3ae244571385c878d0025bdf7a7d394 (patch)
treee24dae740d2d344dcd573e0eaa0981e3d0247ea0 /lib/gitlab/git_access.rb
parentb50a22894d4503cf99cecb8162696f854e1b3f85 (diff)
Remove GitAccessStatus (no longer needed)
Diffstat (limited to 'lib/gitlab/git_access.rb')
-rw-r--r--lib/gitlab/git_access.rb14
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb
index f44426d62b8..4807dc9a5fb 100644
--- a/lib/gitlab/git_access.rb
+++ b/lib/gitlab/git_access.rb
@@ -51,7 +51,7 @@ module Gitlab
check_push_access!(changes)
end
- build_status_object(true)
+ true
end
def guest_can_download_code?
@@ -167,11 +167,9 @@ module Gitlab
# Iterate over all changes to find if user allowed all of them to be applied
changes_list.each do |change|
- status = check_single_change_access(change)
- unless status.allowed?
- # If user does not have access to make at least one change - cancel all push
- raise UnauthorizedError, status.message
- end
+ # If user does not have access to make at least one change, cancel all
+ # push by allowing the exception to bubble up
+ check_single_change_access(change)
end
end
@@ -246,9 +244,5 @@ module Gitlab
nil
end
end
-
- def build_status_object(status)
- Gitlab::GitAccessStatus.new(status)
- end
end
end