git_shell.rb revision c3a6c336056933aaedbf12520434a95a9ce1ea5c
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
puts "Welcome to Ontohub, #{username}!"
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