[Pmwiki-users] [:if:] Syntax Question

Knut Alboldt mailing
Sat Oct 16 15:27:33 CDT 2004


At 20:11 16.10.2004, you wrote:
>This [:if:] syntax seems like it might have some real good potential.
>I'm wondering if/how it could be used to determine the user's auth
>level, and possibly add/hide
>
>
>1) items from the page template
>2) items from the wikitext (possibly a side bar or something)
>
>
>Thanks in advance for any suggestions/examples.
>
>-S
>


on 12 Oct, Patrick gave some statements to check the user's authorization:

>if (RetrieveAuthPage($pagename,'edit',false)) {
>    # user is authorized to edit
>} else {
>    # user is not yet authorized to edit
>}
>
>This will generally not work if you're using HTTP-based authentication,
>because browsers typically send authentication information only in
>response to a request for it.  It should work with session-based
>authentication, however.  It will work especially nicely under v2's
>session-based authentication, which keeps track of all of the passwords
>entered during a particular browsing session (instead of just the most
>recent one).

so this "only" has to be defined within the $Conditions-array (but I don't 
know how yet, but it should be possible). This was one of the features I 
had in pmwiki v1 and want to port to pmwiki 2.

Knut 




More information about the pmwiki-users mailing list