[pmwiki-users] Fox authorization to post when user only has read access
Hans
design5 at softflow.co.uk
Mon Jan 14 08:19:00 CST 2008
Monday, January 14, 2008, 2:00:04 PM, Randy wrote:
> I have a file called MyGroup.MyPage.php which is in the local
> directory that contains config.php. That file contains:
> <?php if (!defined('PmWiki')) exit();
> $FoxAuth='read';
> I would think readers of MyGroup.MyPage would thus be able to post
> regardless of what I do in config.php - but they can't unless I grant
> the authorization to all pages in config.php as you described.
I think the page local customisation php file gets loaded later than
config.php, so setting $FoxAuth='read' there comes too late.
I quote from PmWiki.PerGroupCustomizations:
"Processing order. For all local customizations, PmWiki first processes
the local/config.php file, and then looks for a per-page customization
file in the local/ subdirectory to process, followed by any per-group
customization file. If no per-page or per-group customizations are
loaded, then PmWiki loads local/default.php. If a per-page
customization wants to have the per-group customizations loaded first,
it can do so directly by using PHP's include_once() function."
Try this instead in config.php, before fox.php is included, as a page
specific customisation:
$page = PageVar($pagename, '$FullName');
if ($page=='MyGroup.MyPage')
$FoxAuth = 'read';
and replace MyGroup.MyPage with the specific full page name.
~Hans
More information about the pmwiki-users
mailing list