Set the allow_editing wiki option to true by default.

This commit is contained in:
Dawa Ometto
2015-01-22 23:34:29 +01:00
parent 868cbdfc7b
commit e5c2e3b3eb
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -102,7 +102,8 @@ module Precious
@css = settings.wiki_options[:css]
@js = settings.wiki_options[:js]
@mathjax_config = settings.wiki_options[:mathjax_config]
@allow_editing = settings.wiki_options.fetch(:allow_editing, true)
settings.wiki_options[:allow_editing] = settings.wiki_options.fetch(:allow_editing, true)
@allow_editing = settings.wiki_options[:allow_editing]
end
get '/' do
+1 -1
View File
@@ -39,7 +39,7 @@ module Precious
url.gsub('%2F', '/').gsub(/^\/+/, '').gsub('//', '/')
end
def forbid(msg = "Forbidden.")
def forbid(msg = "Forbidden. This wiki is set to no-edit mode.")
@message = msg
status 403
halt mustache :error