[pmwiki-users] Set a password for some actions | need help, please
Patrick R. Michaud
pmichaud at pobox.com
Wed Mar 8 09:58:57 CST 2006
On Wed, Mar 08, 2006 at 04:49:59PM +0100, kirpi at kirpi.it wrote:
> > I successfully set a password for a whole Group:
> > http://www.example.com/pmwiki.php?n=GroupName.GroupAttributes?action=attr
> >
> > read: open to all
> > edit: password
> > attr: password
> >
> > Then I extended the "lock" with these lines in my Group.php file:
> > $HandleAuth['source'] ='edit';
> > $HandleAuth['diff'] ='edit';
> > $HandleAuth['print'] ='edit';
> > $HandleAuth['search'] ='edit';
> >
> > First problem: all the above actions now require a password *but*
> > ?action=search.
> > Why? What's wrong? How do I fix this?
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.)
> > Second question.
> > 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?
>
> Or maybe there is a solution the other way round: block everything
> *but* one thing per page, be that ?action=pdf or ?action=browse ?
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.
Pm
More information about the pmwiki-users
mailing list