Class: Wiki2Go::ReadWriteWikiConfig
- Defined in:
- lib/Wiki2Go/ReadWriteWikiConfig.rb
Overview
Base class for read/write wikis (authenticated users can write, everybody can read)
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Config
#allow_dynamic_pages, #amazon_affiliate, #blog_style, #debug, #default_page, #default_web, #generate_html, #maximum_urls, #multi_wiki, #port, #root_directory, #server, #site_admin, #site_directory, #subsite
Instance Method Summary collapse
-
#editable?(web) ⇒ Boolean
Wiki is editable if user is authenticated.
-
#initialize(directory) ⇒ ReadWriteWikiConfig
constructor
A new instance of ReadWriteWikiConfig.
-
#redirect_url?(web, url) ⇒ Boolean
Never redirect URLs, we trust our authenticated writers.
Methods inherited from Config
#accept_page?, #add_processor, #close, #commit_to_repository, #default_wiki, #enable_dot_graphics, #enable_syntax_highlighting, #errorlog, #instant_commit_to_repository, #log, #logfile, #logger, #preprocess, #redirect_to_html?, #save, #static_web, #storage, #update_from_repository, #use_repository
Constructor Details
#initialize(directory) ⇒ ReadWriteWikiConfig
Returns a new instance of ReadWriteWikiConfig.
10 11 12 13 |
# File 'lib/Wiki2Go/ReadWriteWikiConfig.rb', line 10 def initialize(directory) super(directory) @generate_html = true end |
Instance Method Details
#editable?(web) ⇒ Boolean
Wiki is editable if user is authenticated
16 17 18 |
# File 'lib/Wiki2Go/ReadWriteWikiConfig.rb', line 16 def editable?(web) web.secure end |
#redirect_url?(web, url) ⇒ Boolean
Never redirect URLs, we trust our authenticated writers
21 22 23 |
# File 'lib/Wiki2Go/ReadWriteWikiConfig.rb', line 21 def redirect_url?(web,url) false end |