X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/ee1ad53c4c2710aa7ded61bdc56f3a8cce514f22..d724a26754b3018ff6b119bb016c5ba261a51d0e:/IkiWiki/Plugin/anonok.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/anonok.pm b/IkiWiki/Plugin/anonok.pm index cd05cd865..1880516d5 100644 --- a/IkiWiki/Plugin/anonok.pm +++ b/IkiWiki/Plugin/anonok.pm @@ -10,7 +10,24 @@ sub import { #{{{ } # }}} sub canedit ($$$) { #{{{ - return ""; + my $page=shift; + my $cgi=shift; + my $session=shift; + + my $ret; + + if (exists $config{anonok_pagespec} && length $config{anonok_pagespec}) { + if (pagespec_match($page, $config{anonok_pagespec}, + location => $page)) { + return ""; + } + else { + return undef; + } + } + else { + return ""; + } } #}}} 1