diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-06-09 15:39:00 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-06-09 15:39:00 -0400 |
commit | 48a5f9f2d8daef8c16b3e4b00511e00eaa0fa024 (patch) | |
tree | 08830250e168b2f8e11bd63951a9dabe34110476 /IkiWiki/Plugin | |
parent | 1a880b7d7bcb8da5b1b07baf0fabecac3892b219 (diff) |
Disable the Preferences link if no plugin with an auth hook is enabled.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/passwordauth.pm | 11 |
1 files changed, 9 insertions, 2 deletions
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 |