[pmwiki-users] Question about (:if expr auth admin:)

Dominique Faure dominique.faure.1 at free.fr
Tue Sep 20 01:33:20 CDT 2005

At Tuesday, September 20, 2005 6:19 AM [GMT+1=CET], Christopher Dant wrote:

> Hello All,
> New to PM Wiki and so far loving it for use on our company intranet - in
> particular the combination of groups-permissions and userauth-0.64. Much
> of our site will be a 'traditional' wiki, and some of it will be used
> for distributing and working with restricted documents. I'm going to try
> to explain what's going on for me - sorry for the long post!
> I've got the wiki running pretty well on XP SP2:
> - pmwiki-2.0.6
> - cookbook\extendcond.php
> - Apache/2.0.54
> - PHP Version 5.0.4
> I'm looking for a way to conditionally display text on read-only pages.
> I learned about conditional expressions of the sort:
> (:if expr auth admin:)Only Admins see this!(:ifend:)
> My problem is that the above example never works. These minimal examples
> DO work as expected:
> (:if true:)Always(:ifend:)
> (:if expr true:)Always(:ifend:)
> (:if !true:)Never(:ifend:)
> (:if false:)Never(:ifend:)
> This example I copied from the site also doesn't work:
> (:if expr auth admin || auth attr || auth edit :)
> [[Logout -> {$Name}?action=logout]] %green%{$Author}%%
> (:ifend:)
> I've checked and no one else has reported this so I'm assuming that the
> problem's probably on my end.
> Can anyone suggest something I can try?
> Thanks!
> Chris
> Fremont, California

AFAIK, the 'auth' condition is tight with the internal authuser 
authentication mecanism (different from the cookbook recipe userauth-0.64).

You may try things like:

Auth level is
(:if auth admin:)admin
(:if auth attr :)attr
(:if auth edit :)edit

and open the page with different credentials to see if the basic conditions 
are met as expected.

Hope this help,

More information about the pmwiki-users mailing list