diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-10-27 12:34:23 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-10-27 16:57:57 +0300 |
commit | 00bf30ba9f5831e74b6990d4179bd6e4c0ce072a (patch) | |
tree | e55c08dafc6d0a6100aa1a3bbb49433e77699339 /lib/gitlab_access.rb | |
parent | eae98b679b775454c630440b93f41dfdc8b1f72d (diff) | |
download | gitlab-shell-dz-support-nested-namespaces.tar.gz |
Use full repository path for API calls instead of extracting namedz-support-nested-namespaces
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib/gitlab_access.rb')
-rw-r--r-- | lib/gitlab_access.rb | 5 |
1 files changed, 2 insertions, 3 deletions
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? |