From 00bf30ba9f5831e74b6990d4179bd6e4c0ce072a Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 27 Oct 2016 12:34:23 +0300 Subject: Use full repository path for API calls instead of extracting name Signed-off-by: Dmitriy Zaporozhets --- lib/gitlab_access.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/gitlab_access.rb') diff --git a/lib/gitlab_access.rb b/lib/gitlab_access.rb index 04806b2..ab431bf 100644 --- a/lib/gitlab_access.rb +++ b/lib/gitlab_access.rb @@ -9,19 +9,18 @@ class GitlabAccess include NamesHelper - attr_reader :config, :repo_path, :repo_name, :changes, :protocol + attr_reader :config, :repo_path, :changes, :protocol def initialize(repo_path, actor, changes, protocol) @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, @protocol) + status = api.check_access('git-receive-pack', @repo_path, @actor, @changes, @protocol) raise AccessDeniedError, status.message unless status.allowed? -- cgit v1.2.1