opendiscussion: This plugin will also now allow posting comments
authorJoey Hess <joey@gnu.kitenet.net>
Sat, 6 Feb 2010 21:19:17 +0000 (16:19 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Sat, 6 Feb 2010 21:19:17 +0000 (16:19 -0500)
to otherwise locked-down sites.

IkiWiki/Plugin/opendiscussion.pm
debian/changelog
doc/plugins/comments.mdwn
doc/plugins/lockedit.mdwn
doc/plugins/opendiscussion.mdwn

index 4b91f5d8314e440920672759d0bc7c2cc394fda0..5a455940b8b9fc286aec4816973d09f39f0510b7 100644 (file)
@@ -25,6 +25,7 @@ sub canedit ($$) {
        my $session=shift;
 
        return "" if $page=~/(\/|^)\Q$config{discussionpage}\E$/i;
+       return "" if pagespec_match($page, "postcomment(*)");
        return undef;
 }
 
index b4acac633f9d507b5850c54434beffcb439dfe36..a65592277da98d0287dc35f84064bf23e6dd518d 100644 (file)
@@ -10,6 +10,8 @@ ikiwiki (3.20100123) UNRELEASED; urgency=low
   * Add link to userpage (or creation link) to top of preferences page.
   * auto-blog.setup: Lock all pages, so only admin can post to the blog
     by default.
+  * opendiscussion: This plugin will also now allow posting comments
+    to otherwise locked-down sites. 
 
  -- Joey Hess <joeyh@debian.org>  Tue, 26 Jan 2010 22:25:33 -0500
 
index b6d4d252bd3954265405a9e16815593b0d443e07..f933d32beea2670b3fa8331ee0b745aea6e3dc1a 100644 (file)
@@ -14,8 +14,8 @@ authorship should hopefully be unforgeable by CGI users.
 The intention is that on a non-wiki site (like a blog) you can lock all
 pages for admin-only access, then allow otherwise unprivileged (or perhaps
 even anonymous) users to comment on posts. See the documentation of the
-[[lockedit]] and [[anonok]] pages for details on locking down a wiki so
-users can only post comments.
+[[opendiscussion]], [[lockedit]] and [[anonok]] pages for details on locking
+down a wiki so readers can only post comments.
 
 Individual comments are stored as internal-use pages named something like
 `page/comment_1`, `page/comment_2`, etc. These pages internally use a
index c8f64ea47a6b35579bed329da4da902952920eb3..6811632038953fca491d896c07768a9e3f0ea1ee 100644 (file)
@@ -12,14 +12,9 @@ to lock. For example, you could choose to lock all pages created before
 2006, or all pages that are linked to from the page named "locked". More
 usually though, you'll just list some names of pages to lock.
 
-One handy thing to do if you're using ikiwiki for your blog is to lock
-"* and !*/Discussion". This prevents others from adding to or modifying
-posts in your blog, while still letting them comment via the Discussion
-pages.
-
-Alternatively, if you're using the [[comments]] plugin, you can lock
-"!postcomment(*)" to allow users to comment on pages, but not edit anything
-else.
+If you want to lock down a blog so only you can post to it, you can just
+lock "*", and enable the [[opendiscussion]] plugin, so readers can still post
+[[comments]].
 
 Wiki administrators can always edit locked pages. The [[ikiwiki/PageSpec]]
 can specify that some pages are not locked for some users. For example,
index b2ba68bf7796a23d85d7cba5c7f403448e349f09..3b5ab4858dcde5b2aebf23f85b869b34e6acd63b 100644 (file)
@@ -1,5 +1,6 @@
 [[!template id=plugin name=opendiscussion author="[[Joey]]"]]
 [[!tag type/auth]]
 
-This plugin allows editing of Discussion pages by anonymous users who have
-not logged into the wiki.
+This plugin allows editing of Discussion pages, and posting of comments,
+even when the [[lockedit]] plugin has been configured to otherwise prevent
+editing.