- if (pagespec_match($page, IkiWiki::userinfo_get($admin, "locked_pages"), "")) {
- return sprintf(gettext("%s is locked by %s and cannot be edited"),
- htmllink("", "", $page, noimageinline => 1),
- IkiWiki::userlink($admin));
+ if (pagespec_match($page, IkiWiki::userinfo_get($admin, "locked_pages"))) {
+ 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));
+ }