X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/ee1ad53c4c2710aa7ded61bdc56f3a8cce514f22..76bda69a92075cbe73ba64232c69e32d7346b277:/IkiWiki/Plugin/anonok.pm 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