summaryrefslogtreecommitdiff
path: root/lib/gitlab_access.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab_access.rb')
-rw-r--r--lib/gitlab_access.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/gitlab_access.rb b/lib/gitlab_access.rb
index 547b81d..78d353c 100644
--- a/lib/gitlab_access.rb
+++ b/lib/gitlab_access.rb
@@ -1,6 +1,5 @@
require_relative 'gitlab_init'
require_relative 'gitlab_net'
-require_relative 'gitlab_access_status'
require_relative 'names_helper'
require 'json'
@@ -18,14 +17,13 @@ class GitlabAccess
end
def exec
- status = api.check_access('git-receive-pack', @repo_name, @actor, @changes)
- if status.allowed?
- true
+ if api.allowed?('git-receive-pack', @repo_name, @actor, @changes)
+ return true
else
# reset GL_ID env since we stop git push here
ENV['GL_ID'] = nil
- puts "GitLab: #{status.message}"
- false
+ puts "GitLab: You are not allowed to access some of the refs!"
+ return false
end
end