]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
loginselector: When only openid and emailauth are enabled, but passwordauth is not...
authorJoey Hess <joeyh@joeyh.name>
Wed, 2 Mar 2016 20:35:16 +0000 (16:35 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 2 Mar 2016 20:35:16 +0000 (16:35 -0400)
IkiWiki/Plugin/loginselector.pm
debian/changelog

index 26c80b4ce4c3a23423daff216b539217abea0307..17539ce8afe33fc9896803fe56a88d36a04bc0d1 100644 (file)
@@ -94,7 +94,6 @@ sub checkconfig () {
                my $real_cgi_signin;
                my $otherform_label=gettext("Other");
                if (keys %{$IkiWiki::hooks{auth}} > 1) {
-                       $real_cgi_signin=\&IkiWiki::cgi_signin;
                        # Special case to avoid labeling password auth as
                        # "Other" when it's the only auth plugin not
                        # integrated with the loginselector.
@@ -106,6 +105,9 @@ sub checkconfig () {
                        if (keys %h == 1 && exists $h{passwordauth}) {
                                $otherform_label=gettext("Password");
                        }
+                       if (keys %h > 0) {
+                               $real_cgi_signin=\&IkiWiki::cgi_signin;
+                       }
                }
                inject(name => "IkiWiki::cgi_signin", call => sub ($$) {
                        login_selector($real_cgi_signin, $otherform_label, @_);
index 615ad4ee2462ffda4f73c3d05c943a94f6131876..2b8fbffaa5a62102faaede460fb3621e25f0613d 100644 (file)
@@ -1,8 +1,14 @@
 ikiwiki (3.20160122) UNRELEASED; urgency=medium
 
+  [ Simon McVittie ]
   * d/control: use https for Homepage
   * d/control: add Vcs-Browser
 
+  [ Joey Hess ]
+  * loginselector: When only openid and emailauth are enabled, but
+    passwordauth is not, avoid showing a "Other" box which opens an
+    empty form.
+
  -- Simon McVittie <smcv@debian.org>  Thu, 21 Jan 2016 22:34:04 +0000
 
 ikiwiki (3.20160121) unstable; urgency=medium