[pmwiki-users] defining Usergroups in config.php or farmconfig.php

Patrick R. Michaud pmichaud at pobox.com
Wed Sep 6 15:40:12 CDT 2006

On Tue, Sep 05, 2006 at 12:58:20AM +0200, pmwiki Besenreuther wrote:
> - Operating manual (one group for reading and one for editin)
> The configuration runs, but only if I define all users and groups
> in project1/Site.AuthUser. So there is no way to get the user
> managed on one place (e.q. formconfig.php, mysql, others)

Yes, they can be managed from a single Site.AuthUser page --
see http://www.pmwiki.org/wiki/Cookbook/SharedPages .

> It doesn't work with users coming from farmconfig.php or mysql
> So I think it would be very eligible to define the users and groups
> in farmconfig.php, like this:
> $AuthUser['nancy'] = crypt('nancyspassword');
> $AuthUser['bart'] = crypt('bartspassword');

This is supposed to work, but doesn't because of an error in authuser.php.
However, the following should work:

    $AuthUser['nancy'] = array('nancyspassword');
    $AuthUser['bart'] = array('bartspassword');

> $AuthGroup['proj1_ps_read'] = array('nancy','bart','me', ...);
> $AuthGroup['proj1_ps_edit'] = array('bart','me', ...);

Eventually these will be available as:

   $AuthUser['@proj1_ps_read'] = array('nancy', 'bart', 'me', ...);
   $AuthUser['@proj1_ps_edit'] = array('bart', 'me', ...);

> Then it would be possible to manage the page authorisation in a
> easy way by defining group authorisation in the file:
>  ../project1/wiki.d/projectspecification.homepage

It's already possible for a script to select a different location
for the Site.AuthUser file by changing the value of $AuthUserPageFmt.
Note that this has to be done *before* calling authuser.php.  :-)


More information about the pmwiki-users mailing list