git_shell.rb revision 201b0ddea98c2d94d56d85d8f09d3ae7c8b87060
require 'open3'
@command = command
end
def exec
if @command
if GIT_CMDS.include?(@git_cmd)
else
message = "git-shell: Access denied for git command <#{@command}> by #{log_username}."
end
else
message = "git-shell: Attempt to execute disallowed command <#{@command}> by #{log_username}."
puts 'Not allowed command'
end
else
exit(1)
end
end
end
cmd = "#{@git_cmd} #{repo_full_path}"
end
end
end
end
# Can't use "@user ||=" because that will keep hitting the API when @user is really nil!
@user
else
end
end
end
# User identifier to be used in log messages.
end
end