diff options
Diffstat (limited to 'lib/gitlab_access.rb')
-rw-r--r-- | lib/gitlab_access.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/gitlab_access.rb b/lib/gitlab_access.rb index 10afeef..bab2c4c 100644 --- a/lib/gitlab_access.rb +++ b/lib/gitlab_access.rb @@ -9,18 +9,19 @@ class GitlabAccess include NamesHelper - attr_reader :config, :repo_path, :repo_name, :changes + attr_reader :config, :repo_path, :repo_name, :changes, :protocol - def initialize(repo_path, actor, changes) + def initialize(repo_path, actor, changes, protocol = nil) @config = GitlabConfig.new @repo_path = repo_path.strip @actor = actor @repo_name = extract_repo_name(@repo_path.dup) @changes = changes.lines + @protocol = protocol end def exec - status = api.check_access('git-receive-pack', @repo_name, @actor, @changes) + status = api.check_access('git-receive-pack', @repo_name, @actor, @changes, @protocol) raise AccessDeniedError, status.message unless status.allowed? |