[pmwiki-users] AuthUser enhancements

Christian Schlatter ch at schlatter.net
Fri Sep 2 14:50:33 CDT 2005

Patrick R. Michaud wrote:
> On Fri, Sep 02, 2005 at 09:12:01PM +0200, Christian Schlatter wrote:
>>I plan to use PmWiki as a CMS-like tool for a new website, so I'd like 
>>to have
>>- identity based authentication
>>- login/logout page
>>- conditional menu items
>>As far as I know this can be achieved using
>>- AuthUser Cookbook
>>- LoginLogout Cookbook
>>- including adapted Site.PageActions in template
>>Wouldn't it be nice to have all of this in one cookbook script ;-)
> Actually, all of these except LoginLogout are already in the
> core distribution, and I'll probably add a login/logout feature
> real soon. :-)


>>Additionally a page named Site.PageActionsCond could be introduced in 
>>wikilib. The content of this page would be (from Pm's post):
>>    * %item class=browse% [[{$FullName} | View]]
>>    * %item class=edit% [[{$FullName}?action=edit | Edit]]
>>    * %item class=history% [[{$FullName}?action=diff | History]]
>>    (:if auth upload:)
>>    * %item class=upload% [[{$FullName}?action=upload | Attach]]
>>    (:if:)
>>    * %item class=print% [[{$FullName}?action=print | Print]]
> I think this is already the content of Site.PageActions in the
> distribution (actually, Site.PageActions is a little more sophisticated
> than this, and includes accesskey support and internationalization).

Oh, I copied the wrong text block from your mail. I'd rather meant

     (:if auth read:)
     * %item class=browse% [[{$FullName} | View]]
     (:if auth edit:)
     * %item class=edit% [[{$FullName}?action=edit | Edit]]
     * %item class=history% [[{$FullName}?action=diff | History]]
     (:if auth upload:)
     * %item class=upload% [[{$FullName}?action=upload | Attach]]
     (:if auth read:)
     * %item class=print% [[{$FullName}?action=print | Print]]

Ideally, there would be a conditional that checks if a user is logged 
in. Maybe something like

     (:if auth login:)
     [[{$FullName}?action=logout | Logout]]
     (:if !auth login:)
     [[{$FullName}?action=login | Login]]


More information about the pmwiki-users mailing list