From: Joey Hess Date: Mon, 30 Aug 2010 22:32:32 +0000 (-0400) Subject: httpauth: Avoid redirecting the user to the cgiauthurl if they already have a login... X-Git-Tag: 3.20100831~5 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/f55c7d13966ff1cd90ddf50e05829f6bb3eda557?ds=inline;hp=-c httpauth: Avoid redirecting the user to the cgiauthurl if they already have a login session. --- f55c7d13966ff1cd90ddf50e05829f6bb3eda557 diff --git a/IkiWiki/Plugin/httpauth.pm b/IkiWiki/Plugin/httpauth.pm index 868862f4f..cb488449d 100644 --- a/IkiWiki/Plugin/httpauth.pm +++ b/IkiWiki/Plugin/httpauth.pm @@ -84,6 +84,8 @@ sub canedit ($$$) { my $session=shift; if (! defined $cgi->remote_user() && + (! defined $session->param("name") || + ! IkiWiki::userinfo_get($session->param("name"), "regdate")) && defined $config{httpauth_pagespec} && length $config{httpauth_pagespec} && defined $config{cgiauthurl} && diff --git a/debian/changelog b/debian/changelog index a1ef33b22..44b54b123 100644 --- a/debian/changelog +++ b/debian/changelog @@ -23,8 +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. + * httpauth: Avoid redirecting the user to the cgiauthurl if + they already have a login session. -- Joey Hess Sun, 15 Aug 2010 11:45:48 -0400