[pmwiki-users] I need to check page auth (AuthUser) inside of php

Chris Cox ccox at airmail.net
Wed Aug 8 15:58:04 CDT 2007


I saw that (:if auth edit:) that the 'auth' was defined as:
$Conditions['auth'] =
'@$GLOBALS["PCache"][$GLOBALS["pagename"]]["=auth"][trim($condparm)]';

I guess I'm stupid though.. how can I make an 'if' statement
in php to check if the user is authorized for a particular
thing (edit, read, etc) on a specific page??

Looks like pmwiki code mainly does this kind of processing
on page access.... so it's built into RetrieveAuthPage.

I'm trying to figure out some way of making SSL password page
(which is difficult since the auth form is not really a "page")
work right.

There's just way too many ways the existing recipes fail to
let go of SSL encryption after the password entry part.
If I can test to see if the user has the ability to perform
the "action" on the page, I can redirect (I think) to
not using SSL.

Sigh... this would be ridiculously easy if the authorization
mechanism were really a page btw (could just use rewrites...
this works for UserAuth).






More information about the pmwiki-users mailing list