Set the allow_editing wiki option to true by default.
This commit is contained in:
+2
-1
@@ -102,7 +102,8 @@ module Precious
|
|||||||
@css = settings.wiki_options[:css]
|
@css = settings.wiki_options[:css]
|
||||||
@js = settings.wiki_options[:js]
|
@js = settings.wiki_options[:js]
|
||||||
@mathjax_config = settings.wiki_options[:mathjax_config]
|
@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
|
end
|
||||||
|
|
||||||
get '/' do
|
get '/' do
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ module Precious
|
|||||||
url.gsub('%2F', '/').gsub(/^\/+/, '').gsub('//', '/')
|
url.gsub('%2F', '/').gsub(/^\/+/, '').gsub('//', '/')
|
||||||
end
|
end
|
||||||
|
|
||||||
def forbid(msg = "Forbidden.")
|
def forbid(msg = "Forbidden. This wiki is set to no-edit mode.")
|
||||||
@message = msg
|
@message = msg
|
||||||
status 403
|
status 403
|
||||||
halt mustache :error
|
halt mustache :error
|
||||||
|
|||||||
Reference in New Issue
Block a user