[pmwiki-users] Fox authorization to post when user only has read access
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();
> 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
$page = PageVar($pagename, '$FullName');
$FoxAuth = 'read';
and replace MyGroup.MyPage with the specific full page name.
More information about the pmwiki-users