X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/919d66b3257a7733049b8ac158ae6c80e0613ef0..7cae2951248245cb8b4da69d0f28065c394b31a2:/doc/bugs/anonok_vs._httpauth.mdwn?ds=inline diff --git a/doc/bugs/anonok_vs._httpauth.mdwn b/doc/bugs/anonok_vs._httpauth.mdwn index 1c492139b..bff37e18b 100644 --- a/doc/bugs/anonok_vs._httpauth.mdwn +++ b/doc/bugs/anonok_vs._httpauth.mdwn @@ -65,7 +65,7 @@ like anonok first. I have not tested this. --[[Joey]]
diff --git a/IkiWiki/Plugin/httpauth.pm b/IkiWiki/Plugin/httpauth.pm -index 127c321..c181164 100644 +index 127c321..a18f8ca 100644 --- a/IkiWiki/Plugin/httpauth.pm +++ b/IkiWiki/Plugin/httpauth.pm @@ -9,6 +9,8 @@ use IkiWiki 3.00; @@ -77,11 +77,13 @@ index 127c321..c181164 100644 } sub getsetup () { -@@ -33,10 +35,20 @@ sub auth ($$) { +@@ -33,9 +35,21 @@ sub auth ($$) { if (defined $cgi->remote_user()) { $session->param("name", $cgi->remote_user()); } - elsif (defined $config{cgiauthurl}) { +- IkiWiki::redirect($cgi, $config{cgiauthurl}.'?'.$cgi->query_string()); +- exit; +} + +sub canedit ($$$) { @@ -90,13 +92,27 @@ index 127c321..c181164 100644 + my $session=shift; + + if (! defined $cgi->remote_user() && defined $config{cgiauthurl}) { - IkiWiki::redirect($cgi, $config{cgiauthurl}.'?'.$cgi->query_string()); - exit; - } ++ return sub { ++ IkiWiki::redirect($cgi, $config{cgiauthurl}.'?'.$cgi->query_string()); ++ exit; ++ }; ++ } + else { + return undef; -+ } -} + } + } - 1+ +> With `anonok` enabled, this works for anonymous editing of an +> existing Discussion page. auth is still needed to create one. --[[schmonz]] + +>> Refreshed above patch to fix that. --[[Joey]] + +>> Remaining issue: This patch will work with anonok, but not openid or +>> passwordauth, both of which want to display a login page at the same +>> time that httpauth is redirecting to the cgiauthurl. As mentioned above, +>> the only way to deal with that would be to add a link to the signin page +>> that does the httpauth signin. --[[Joey]] + +>>> That's dealt with in final version. [[done]] --[[Joey]]