aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-10-11 23:38:41 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-10-11 23:38:41 -0400
commit4cce29259353223b1091a83e03748ae4b34b0796 (patch)
treee76fb11269ec3b5379387abadc17bd3579b6ce3c
parentbf577d34c79ebe48efdf06ed826f9109e196cc6d (diff)
parent6993d1f905c35bbad415d3f60cde924da32e80a4 (diff)
downloadikiwiki-4cce29259353223b1091a83e03748ae4b34b0796.tar
ikiwiki-4cce29259353223b1091a83e03748ae4b34b0796.tar.gz
Merge branch 'master' into dependency-types
-rw-r--r--doc/plugins/lockedit/discussion.mdwn27
1 files changed, 7 insertions, 20 deletions
diff --git a/doc/plugins/lockedit/discussion.mdwn b/doc/plugins/lockedit/discussion.mdwn
index b058b2b07..8a08edaad 100644
--- a/doc/plugins/lockedit/discussion.mdwn
+++ b/doc/plugins/lockedit/discussion.mdwn
@@ -1,21 +1,8 @@
-This plugin not only locks pages but ensures too a user is logged in. This seems to me redundant with signedit. I propose :
+This plugin not only locks pages but ensures too a user is logged in. This
+seems to me redundant with signedit. I propose [removing the if block that
+calls needsignin ].
- sub canedit ($$) {
- my $page=shift;
- my $cgi=shift;
- my $session=shift;
-
- my $user=$session->param("name");
- return undef if defined $user && IkiWiki::is_admin($user);
-
- if (defined $config{locked_pages} && length $config{locked_pages} &&
- pagespec_match($page, $config{locked_pages},
- user => $session->param("name"),
- ip => $ENV{REMOTE_ADDR},
- )) {
- return sprintf(gettext("%s is locked and cannot be edited"),
- htmllink("", "", $page, noimageinline => 1));
- }
-
- return undef;
- }
+> That was added because the most typical reason for being unable to edit a
+> page is that you are not logged in. And without the jump to logging the
+> user in, there is no way for the user to log in, without navigating away
+> from the page they were trying to edit. --[[Joey]]