[pmwiki-users] Setting page privs from config.php
bartolin at gmx.de
Fri Oct 2 01:33:51 CDT 2009
* On 2009-10-01 DaveG (pmwiki at solidgone.com) wrote:
> > 1. if you need it, include the group customization file with
> > include_once()
> > 2. set your password
> That's the problem -- there are ways to set the edit/admin password but
> not the passwords for a page. As others have noted I'll take a look at
> setting the page attribute directly.
Maybe I misread your question and you want something else, but ...
My suggestion was to override the global passwords (from config.php)
in a page customization file (say Main.Test.php for page Main.Test).
If you have in local/config.php
$DefaultPasswords['admin'] = crypt('secret');
$DefaultPasswords['edit'] = crypt('secret');
$DefaultPasswords['read'] = crypt('secret');
and you have in local/Main.Test.php
$DefaultPasswords['edit'] = crypt('slightly_less_secret');
$DefaultPasswords['read'] = crypt('slightly_less_secret');
then you can edit Main.Test (and only this page) with
'slightly_less_secret'. (Unless you have set group wide passwords in
Main.php -- in that case you have to use '$EnablePGCust = 0;' to
prevent the group customization to override your page customization.)
You are also able to edit Main.Test with 'secret' -- because you
didn't override the global admin password.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20091002/565b3d96/attachment.bin
More information about the pmwiki-users