[pmwiki-users] Auth again

Patrick R. Michaud pmichaud at pobox.com
Thu Jun 15 11:32:34 CDT 2006


On Sat, Jun 10, 2006 at 08:45:41PM +0100, Nick Bell wrote:
> How do I set the read/edit passwords? i.e. once I've given the admin  
> password once, pmwiki knows I'm an admin. How do I programmatically -  
> pref. from config.php - set this. What I'm trying to go is set the  
> read and edit passwords to whatever basic auth password let them in.

Assuming you're using HTTP Basic authentication, Apache doesn't
normally provide PmWiki with the value of the password that was
used to authenticate via Apache, so there's no way to 
programmatically set those from config.php.

However, if someone has authenticated via Apache, then Apache will
put their userid into the REMOTE_USER variable.  Assuming you're
loading httpauth.php, I think that saying "allow any authenticated
person to read/edit" is as simple as:

    $DefaultPasswords['read'] = 'id:*';
    $DefaultPasswords['edit'] = 'id:*';

Pm




More information about the pmwiki-users mailing list