+>> This plugin already uses `check_canedit`, but that function doesn't have a concept
+>> of different actions. The hack I use is that when a user comments on, say, sandbox,
+>> I call `check_canedit` for the pseudo-page "sandbox[postcomment]". The
+>> special `postcomment(glob)` [[ikiwiki/pagespec]] returns true if the page ends with
+>> "[postcomment]" and the part before (e.g. sandbox) matches the glob. So, you can
+>> have postcomment(blog/*) or something. (Perhaps instead of taking a glob, postcomment
+>> should take a pagespec, so you can have postcomment(link(tags/commentable))?)
+>>
+>> This is why `anonok_pages => 'postcomment(*)'` and `locked_pages => '!postcomment(*)'`
+>> are necessary to allow anonymous and logged-in editing (respectively).
+>>
+>> This is ugly - one alternative would be to add `check_permission()` that takes a
+>> page and a verb (create, edit, rename, remove and maybe comment are the ones I
+>> can think of so far), use that, and port the plugins you mentioned to use that
+>> API too. This plugin could either call `check_can("$page/comment1", 'create')` or
+>> call `check_can($page, 'comment')`.
+>>
+>> One odd effect of the code structure I've used is that we check for the ability to
+>> create the page before we actually know what page name we're going to use - when
+>> posting the comment I just increment a number until I reach an unused one - so
+>> either the code needs restructuring, or the permission check for 'create' would
+>> always be for 'comment1' and never 'comment123'. --[[smcv]]
+
+>> Another possibility is to just check for permission to edit (e.g.) `sandbox/comment1`.
+>> However, this makes the "comments can only be created, not edited" feature completely
+>> reliant on the fact that internal pages can't be edited. Perhaps there should be a
+>> `editable_pages` pagespec, defaulting to `'*'`?
+