[pmwiki-users] Set a password for some actions | need help, please

H. Fox haganfox at users.sourceforge.net
Wed Mar 8 19:45:11 CST 2006


On 3/8/06, kirpi at kirpi.it <kirpi at kirpi.it> wrote:
> > Is the ?action=search actually taking place from a page in the
> > Group, or is it coming from the Site.Search page?  (Changing $HandleAuth
> > in Group.php won't have any effect if Site.Search is the page being loaded.)
>
> Ok, I think now I better understand what you ask.
> ?action=search is *not* coming from Site.Search page?
>
> > > > I have a couple of pages, say Group.A and Group.B for which I need to
> > > > block all the actions *but* ?action=pdf. In other words I would like
> > > > to let the people see the pdf created on the fly, but not the regular
> > > > pages.
> > > > How do I accomplish this, please?
> > How about...?
> >
> >    if ($action != 'pdf') $HandleAuth[$action] = 'admin';
> >
> > Basically this says that one can only do ?action=pdf on a page,
> > everything else will require admin permissions.
>
> Where should I insert the line you suggest, please?

If the page you want is called MyGroup.SomePage, you would put it in
local/MyGroup.SomePage.php . That file might look like

<?php if (!defined('PmWiki')) exit();
if ($action != 'pdf') $HandleAuth[$action] = 'admin';

See http://www.pmwiki.org/wiki/PmWiki/LocalCustomizations

Hagan




More information about the pmwiki-users mailing list