Commit 849d8fdc authored by GitLab's avatar GitLab

Enable git-annex validate access

parent 60ea5770
......@@ -238,4 +238,9 @@ class GitlabProjects
$logger.info "Update head in project #{project_name} to <#{new_head}>."
true
end
def git_init_annex
cmd = %W(git --git-dir=#{full_path} annex init "GitLab")
system(*cmd)
end
end
......@@ -20,12 +20,11 @@ class GitlabShell
if git_cmds.include?(@git_cmd)
ENV['GL_ID'] = @key_id
ENV['HOME'] ='/var/opt/gitlab'
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# TODO: Fix validation for git-annex-shell !!!!
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
if true #validate_access
if validate_access
process_cmd
else
message = "gitlab-shell: Access denied for git command <#{@origin_cmd}> by #{log_username}."
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment