From 48a5f9f2d8daef8c16b3e4b00511e00eaa0fa024 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 9 Jun 2009 15:39:00 -0400 Subject: Disable the Preferences link if no plugin with an auth hook is enabled. --- IkiWiki/Plugin/passwordauth.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'IkiWiki/Plugin/passwordauth.pm') diff --git a/IkiWiki/Plugin/passwordauth.pm b/IkiWiki/Plugin/passwordauth.pm index 90e2ca564..8cf5af51e 100644 --- a/IkiWiki/Plugin/passwordauth.pm +++ b/IkiWiki/Plugin/passwordauth.pm @@ -8,9 +8,10 @@ use IkiWiki 3.00; sub import { hook(type => "getsetup", id => "passwordauth", "call" => \&getsetup); - hook(type => "formbuilder_setup", id => "passwordauth", call => \&formbuilder_setup); - hook(type => "formbuilder", id => "passwordauth", call => \&formbuilder); + hook(type => "formbuilder_setup", id => "passwordauth", call => \&formbuilder_setup); + hook(type => "formbuilder", id => "passwordauth", call => \&formbuilder); hook(type => "sessioncgi", id => "passwordauth", call => \&sessioncgi); + hook(type => "auth", id => "passwordauth", call => \&auth); } sub getsetup () { @@ -337,4 +338,10 @@ sub sessioncgi ($$) { } } +sub auth ($$) { + # While this hook is not currently used, it needs to exist + # so ikiwiki knows that the wiki supports logins, and will + # enable the Preferences page. +} + 1 -- cgit v1.2.3