]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/lockedit.pm
* The calendar plugin stores state about when it needs to be updated,
[git.ikiwiki.info.git] / IkiWiki / Plugin / lockedit.pm
index 13df5632fb1d36f50c2fd6050d1f38069c3405db..a829df1cfba6bf29ce266461c2a8cfde4ffc8be7 100644 (file)
@@ -21,6 +21,7 @@ sub canedit ($$) { #{{{
 
        foreach my $admin (@{$config{adminuser}}) {
                if (pagespec_match($page, IkiWiki::userinfo_get($admin, "locked_pages"))) {
 
        foreach my $admin (@{$config{adminuser}}) {
                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));
                        return sprintf(gettext("%s is locked by %s and cannot be edited"),
                                htmllink("", "", $page, noimageinline => 1),
                                IkiWiki::userlink($admin));
@@ -40,7 +41,8 @@ sub formbuilder_setup (@) { #{{{
 
        if ($form->title eq "preferences") {
                $form->field(name => "locked_pages", size => 50,
 
        if ($form->title eq "preferences") {
                $form->field(name => "locked_pages", size => 50,
-                       comment => "(".htmllink("", "", "PageSpec", noimageinline => 1).")");
+                       fieldset => "admin",
+                       comment => "(".htmllink("", "", "ikiwiki/PageSpec", noimageinline => 1).")");
                if (! IkiWiki::is_admin($user_name)) {
                        $form->field(name => "locked_pages", type => "hidden");
                }
                if (! IkiWiki::is_admin($user_name)) {
                        $form->field(name => "locked_pages", type => "hidden");
                }