aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2010-01-04 15:01:25 -0500
committerJoey Hess <joey@gnu.kitenet.net>2010-01-04 15:01:25 -0500
commitae493178cf58cf5d7edfa30ccabe758b06febcb4 (patch)
tree43335020da28ff200ade4dd202ac8aad25651ccb
parentf8bd25bfc7c590abbd31f42bb4d745d43c3d7f14 (diff)
downloadikiwiki-ae493178cf58cf5d7edfa30ccabe758b06febcb4.tar
ikiwiki-ae493178cf58cf5d7edfa30ccabe758b06febcb4.tar.gz
lockedit: Detect if no authentication plugins are enabled, and die with an error message as this configuration does not make sense.
-rw-r--r--IkiWiki/Plugin/lockedit.pm7
-rw-r--r--debian/changelog2
2 files changed, 9 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/lockedit.pm b/IkiWiki/Plugin/lockedit.pm
index 0fa329251..8914ba498 100644
--- a/IkiWiki/Plugin/lockedit.pm
+++ b/IkiWiki/Plugin/lockedit.pm
@@ -7,6 +7,7 @@ use IkiWiki 3.00;
sub import {
hook(type => "getsetup", id => "lockedit", call => \&getsetup);
+ hook(type => "checkconfig", id => "lockedit", call => \&checkconfig);
hook(type => "canedit", id => "lockedit", call => \&canedit);
}
@@ -26,6 +27,12 @@ sub getsetup () {
},
}
+sub checkconfig () {
+ if (! exists $IkiWiki::hooks{auth}) {
+ error gettext("lockedit plugin is enabled, but no authentication plugins are enabled");
+ }
+}
+
sub canedit ($$) {
my $page=shift;
my $cgi=shift;
diff --git a/debian/changelog b/debian/changelog
index aa4f1ac3c..2c121ef54 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ ikiwiki (3.20100104) UNRELEASED; urgency=low
(Sjoerd)
* signinedit: Auto-disable the plugin when all authentication methods
are disabled.
+ * lockedit: Detect if no authentication plugins are enabled, and
+ die with an error message as this configuration does not make sense.
-- Joey Hess <joeyh@debian.org> Mon, 04 Jan 2010 12:53:24 -0500