add function to disable editing, resolves #879

This commit is contained in:
Roman Bambycha
2014-11-17 19:46:46 +02:00
parent 7264510ab2
commit b932763080
14 changed files with 199 additions and 35 deletions
+5
View File
@@ -22,6 +22,7 @@ options = { 'port' => 4567, 'bind' => '0.0.0.0' }
wiki_options = {
:live_preview => false,
:allow_uploads => false,
:allow_editing => true,
}
opts = OptionParser.new do |opts|
@@ -76,6 +77,10 @@ opts = OptionParser.new do |opts|
wiki_options[:ref] = ref
end
opts.on("--no-edit", "Restricts editing capability through frontend.") do
wiki_options[:allow_editing] = false
end
opts.on("--no-live-preview", "Disables livepreview.") do
wiki_options[:live_preview] = false
end