summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/lockedit.pm
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin/lockedit.pm')
-rw-r--r--IkiWiki/Plugin/lockedit.pm13
1 files changed, 9 insertions, 4 deletions
diff --git a/IkiWiki/Plugin/lockedit.pm b/IkiWiki/Plugin/lockedit.pm
index a829df1cf..010705c49 100644
--- a/IkiWiki/Plugin/lockedit.pm
+++ b/IkiWiki/Plugin/lockedit.pm
@@ -21,10 +21,15 @@ sub canedit ($$) { #{{{
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));
+ if (! defined $user ||
+ ! IkiWiki::userinfo_get($session->param("name"), "regdate")) {
+ return sub { IkiWiki::needsignin($cgi, $session) };
+ }
+ else {
+ return sprintf(gettext("%s is locked by %s and cannot be edited"),
+ htmllink("", "", $page, noimageinline => 1),
+ IkiWiki::userlink($admin));
+ }
}
}