use warnings;
use strict;
-use IkiWiki;
+use IkiWiki 2.00;
sub import { #{{{
hook(type => "canedit", id => "lockedit", call => \&canedit);
return undef if defined $user && IkiWiki::is_admin($user);
foreach my $admin (@{$config{adminuser}}) {
- if (pagespec_match($page, IkiWiki::userinfo_get($admin, "locked_pages"), "")) {
+ if (pagespec_match($page, IkiWiki::userinfo_get($admin, "locked_pages"))) {
+ IkiWiki::needsignin($cgi, $session) unless defined $user;
return sprintf(gettext("%s is locked by %s and cannot be edited"),
htmllink("", "", $page, noimageinline => 1),
IkiWiki::userlink($admin));
if ($form->title eq "preferences") {
$form->field(name => "locked_pages", size => 50,
+ fieldset => "admin",
comment => "(".htmllink("", "", "PageSpec", noimageinline => 1).")");
if (! IkiWiki::is_admin($user_name)) {
$form->field(name => "locked_pages", type => "hidden");