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

Patrick R. Michaud pmichaud at pobox.com
Tue Sep 20 09:28:10 CDT 2005

On Tue, Sep 20, 2005 at 07:12:01AM -0700, Christopher Dant wrote:
> > > 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:)
> > AFAIK, the 'auth' condition is tight with the internal authuser 
> > authentication mecanism (different from the cookbook recipe 
> > userauth-0.64).

Actually, the 'auth' condition works in PmWiki even without
user-based authentication (authuser.php).  All that the auth
condition does is check to see if the browser is authorized
at a given level ('read', 'edit', 'attr', etc.) for the current

IIRC, userauth.php replaces PmWiki's authorization function with
its own special-purpose version, and that version doesn't fill in
the data structures needed for the (:if auth ...:) markup to work.

> Too bad, because I really value the form-based user management solution.
> I'll have to see if I can figure out the problem.

I'm quite willing to develop a "form-based user-management solution"
that works with authuser.php; I just need some idea of what the
interface should look like and what features it needs to support.

(None of my sites require user-based authentication, so I can't
really design a solution for this based on my own needs.  Hearing
from others about this would be a big help.)


More information about the pmwiki-users mailing list