X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/ee1ad53c4c2710aa7ded61bdc56f3a8cce514f22..187d59454b0272f7b8a73958b4a5aa00dc20b2bb:/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