anonk: Add anonok_pagespec configuration setting that can be used to allow anonymous users to edit only matching pages. Closes: #478892
parent
f39659277d
commit
6f852e88e3
|
@ -10,7 +10,24 @@ sub import { #{{{
|
|||
} # }}}
|
||||
|
||||
sub canedit ($$$) { #{{{
|
||||
return "";
|
||||
my $page=shift;
|
||||
my $cgi=shift;
|
||||
my $session=shift;
|
||||
|
||||
my $ret;
|
||||
|
||||
if (length $config{anonok_pagespec}) {
|
||||
if (pagespec_match($page, $config{anonok_pagespec},
|
||||
location => $page)) {
|
||||
return "";
|
||||
}
|
||||
else {
|
||||
return undef;
|
||||
}
|
||||
}
|
||||
else {
|
||||
return "";
|
||||
}
|
||||
} #}}}
|
||||
|
||||
1
|
||||
|
|
|
@ -8,6 +8,8 @@ ikiwiki (2.45) UNRELEASED; urgency=low
|
|||
* Add missing de.po. Closes: #471540
|
||||
* img: Support a title attribute, will be passed through to html.
|
||||
Closes: #478718
|
||||
* anonk: Add anonok_pagespec configuration setting that can be used to
|
||||
allow anonymous users to edit only matching pages. Closes: #478892
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Sat, 26 Apr 2008 15:09:36 -0400
|
||||
|
||||
|
|
|
@ -159,4 +159,8 @@ use IkiWiki::Setup::Standard {
|
|||
# mirror1 => "http://hostname1",
|
||||
# mirror2 => "http://hostname2/mirror",
|
||||
#},
|
||||
|
||||
# For use with the anonok plugin, a PageSpec specifying what
|
||||
# pages anonymous users can edit
|
||||
#anonok_pagespec => "*",
|
||||
}
|
||||
|
|
|
@ -2,4 +2,8 @@
|
|||
[[tag type/auth]]
|
||||
|
||||
By default, anonymous users cannot edit the wiki. This plugin allows
|
||||
anonymous web users, who have not signed in, to edit any page in the wiki.
|
||||
anonymous web users, who have not signed in, to edit any page in the wiki
|
||||
by default.
|
||||
|
||||
The plugin also has a configuration setting, `anonok_pagespec`. This
|
||||
[[PageSpec]] can be used to allow anonymous editing of matching pages.
|
||||
|
|
Loading…
Reference in New Issue