[pmwiki-users] a read-only wiki

Hans design5 at softflow.co.uk
Thu Aug 14 04:18:45 CDT 2008


Thursday, August 14, 2008, 6:43:28 AM, Patrick R. Michaud wrote:

> But if you really want each one to have a separate username/password,
> then AuthUser is the way to go.  In local/config.php, put:

>     ##  editing requires authenticated username
>     $DefaultPasswords['edit'] = 'id:*';
>     ##  admin requires admin password
>     $DefaultPasswords['admin'] = crypt('adminpassword');

> Then, in SiteAdmin.AuthUser add usernames and passwords for each 
> person you want to be able to do editing on the site.

>     alice: (:encrypt alice-password:)
>     bob: (:encrypt bob-password:)
>     carol: (:encrypt carol-password:)

And if you do not wish to use page SiteAdmin.AuthUser to set your
user/password pairs, you can also do this in config.php like

$AuthId['alice'] = crypt('alice-password');
$AuthId['bob'] = crypt('bob-password');
$AuthId['carol'] = crypt('carol-password');

Or if you wish to use groups of authorised users, you can set in
config.php in addition to the user/password pairs defined like above
something like

$DefaultPasswords['edit'] = '@editors';
$AuthId['@editors'] = array('alice','bob','carol');

Since you asked how to set security all in one place (config.php)
it is important to point out that you can only set site-wide
passwords in config.php, but not group-specific or page-specific
passwords. These need to be set using ?action=attr for a single page
or for a group using GroupName.GroupAttributes?action=attr.

So to protect pages in the SiteAdmin and Site group from editing by
your authorised general editors you need to set the 'edit' attribute
to the admin user name or the admin password with
SiteAdmin.GroupAttributes?action=attr and
Site.GroupAttributes?action=attr

This cannot be done in config.php. Each page holds its own security
attributes in its file, and for a group it is hold in a
GroupAttributes page, which is created for this purpose as needs be.

Setting page and group attributes with action=attr is available for
'admin' authorised users, but not for 'edit' authorised  users.


  ~Hans




More information about the pmwiki-users mailing list