diff options
Diffstat (limited to 'IkiWiki/Plugin/lockedit.pm')
-rw-r--r-- | IkiWiki/Plugin/lockedit.pm | 7 |
1 files changed, 7 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; |