Alec Berryman wrote: > I have been using this for several days to allow users with LDAP > accounts full read/write access to a wiki. The only problem I have > encountered is that the Preferences page does not work correctly; it > gives an incorrect password error when trying to change subscriptions > and locked pages.
I guess that the problem could be that there is no record of the user in
the userinfo database, and so things that try to set values for the user
fail. Although I'm not sure how this could result in a password error.
What is the error message exactly?
A change like this might fix it. This tries to detect a new http auth
user and adds a userdb entry for the user. (Sorry about the formatting.)
> === IkiWiki/CGI.pm
> ==================================================================
> --- IkiWiki/CGI.pm (revision 1460)
> +++ IkiWiki/CGI.pm (revision 1461)
> @@ -643,6 +643,7 @@
>
> # Everything below this point needs the user to be signed in.
> if (((! $config{anonok} || $do eq 'prefs') &&
> + (! $config{httpauth}) &&
> (! defined $session->param("name") ||
> ! userinfo_get($session->param("name"), "regdate"))) || $do eq
> 'signin') {
> cgi_signin($q, $session);
> @@ -654,6 +655,14 @@
>
> return;
> }
> +
> + if ($config{httpauth} && (! defined $session->param("name"))) {
> + if (! defined $q->remote_user()) {
> + error("Could not determine authenticated username.");
> + } else {
> + $session->param("name", $q->remote_user());
if (! userinfo_get($session->param("name"), "regdate"))
{
userinfo_setall($session->param("name"), {
email => "",
password => "",
regdate => time,
});
}
> + }
> + }
--
see shy jo
signature.asc
Description: Digital signature

