Avoid trying to log the user in when receiving anonymous pushes from git and a plugin...
authorJoey Hess <joey@kitenet.net>
Mon, 30 Aug 2010 20:05:15 +0000 (16:05 -0400)
committerJoey Hess <joey@kitenet.net>
Mon, 30 Aug 2010 20:05:15 +0000 (16:05 -0400)
Just use check_canedit in nonfatal mode.

IkiWiki/Receive.pm
debian/changelog
doc/bugs/httpauth_conflicts_with_git_anon_push.mdwn

index d116049c49c2bbd33b33d7a7dca6bfdc6b48aa57..14936f8cdca6bb7e9cdad935253be51d4f339b1f 100644 (file)
@@ -95,8 +95,7 @@ sub test () {
                if ($change->{action} eq 'change' ||
                    $change->{action} eq 'add') {
                        if (defined $page) {
-                               IkiWiki::check_canedit($page, $cgi, $session);
-                               next;
+                               next if IkiWiki::check_canedit($page, $cgi, $session, 1);
                        }
                        else {
                                if (IkiWiki::Plugin::attachment->can("check_canattach")) {
index df74e35d1fb11f1d6bcae7605c61d179ba428087..a1ef33b225cd5b4339490838927144305a764d91 100644 (file)
@@ -23,6 +23,8 @@ ikiwiki (3.20100816) UNRELEASED; urgency=low
     setup. (intrigeri)
   * t/bazaar.t: Work around bzr 2.2.0's new requirement to configure
     bzr whoami before committing.
+  * Avoid trying to log the user in when receiving anonymous pushes
+    from git and a plugin like httpauth returns a login function.
 
  -- Joey Hess <joeyh@debian.org>  Sun, 15 Aug 2010 11:45:48 -0400
 
index 3e496fef4391ad0b873cffb0a2a79849bc016052..91507f57a34d3ea12aaa0c20666ecda461b86abf 100644 (file)
@@ -22,4 +22,4 @@ Analysis:
 
 So, all these calls need to avoid running the error handler
 functions returned by canedit hooks, and just return error
-messages.
+messages. [[done]] --[[Joey]]