Package: ikiwiki
Version: 2.44
Severity: wishlist

This allows anonok to be applied to a pagespec specified in the config

diff --git a/IkiWiki/Plugin/anonok.pm b/IkiWiki/Plugin/anonok.pm
index cd05cd8..623aab4 100644
--- a/IkiWiki/Plugin/anonok.pm
+++ b/IkiWiki/Plugin/anonok.pm
@@ -10,7 +10,26 @@ sub import { #{{{
 } # }}}
 
 sub canedit ($$$) { #{{{
-       return "";
+       my $page=shift;
+       my $cgi=shift;
+       my $session=shift;
+
+       my $ret;
+
+       if (${config{anonok_pagespec}}) {
+
+               $ret=pagespec_match($page, "abde", location => $page);
+
+               if ($ret) {
+                       return "";
+               }
+               else {
+                       return undef;
+               }
+       }
+       else {
+               return "";
+       }
 } #}}}
 
 1



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to