projects
/
ikiwiki
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
anonk: Add anonok_pagespec configuration setting that can be used to allow anonymous...
[ikiwiki]
/
IkiWiki
/
Plugin
/
anonok.pm
1
#!/usr/bin/perl
2
package IkiWiki::Plugin::anonok;
3
4
use warnings;
5
use strict;
6
use IkiWiki 2.00;
7
8
sub import { #{{{
9
hook(type => "canedit", id => "anonok", call => \&canedit,);
10
} # }}}
11
12
sub canedit ($$$) { #{{{
13
my $page=shift;
14
my $cgi=shift;
15
my $session=shift;
16
17
my $ret;
18
19
if (length $config{anonok_pagespec}) {
20
if (pagespec_match($page, $config{anonok_pagespec},
21
location => $page)) {
22
return "";
23
}
24
else {
25
return undef;
26
}
27
}
28
else {
29
return "";
30
}
31
} #}}}
32
33
1