[pmwiki-users] Re: Re: Supporting different modes in default pmwiki

Hans design at flutesong.fsnet.co.uk
Sun Aug 7 13:03:08 CDT 2005


Sunday, August 7, 2005, 6:17:23 PM, chr wrote:
> But back to (:if auth ..:)
> I don't think it'll work since it requires the user to enter a password?
> Or rather, it checks if the user is allowed access... what I'm thinking of
> is actually orthogonal to this. Even someone who normally administers the
> wiki should be able to use them in reading mode if he feels like it, while
> still accessing pages that are password protected.

> So something like (:if mode author:) would be needed rather than 'auth'.

For 'if auth' we got the parameters: read, edit, attr, admin, uploads.
According to the permissions set for the page, the group or the site
you will qualify for one or more of these parameters (well none if
read access is restricted as well). So 'IF auth read' will be the
condition met by a normal reader. If this reader then wants to edit
she will be prompted for a password, if the page is edit protected.
Entering the correct password will satisfy the 'IF auth edit'
condition and promote her to the next level. ETC.

How else would pmwiki know if a user is a reader or an author or an
admin? We could use authuser.php and prompt for a name and password,
in which case we can set a condition against an ID, and display a skin
or action list according to this.

Or do you envision a 'mode' switch in the skin? Like ?setmode action
links? Then why not customise variations to a skin and use
?setskin=readmode, ?setskin=editmode, ?setskin=adminmode,
with readmode, editmode and adminmode being these skin variations.

BTW if auth edit works in config.php, after I followed Pm's advise.
I'm going to write this all into a cookbook page.


Best, 
~Hans                           





More information about the pmwiki-users mailing list