AuthUserCMSLike

Summary: Restricts access to PageActions by role
Version: 1.0
Prerequisites:
Maintainer: BenWilson
Categories: CMS

Question

Some people want to merge the "best features" of UserAuth and AuthUser. Among these is integration with CMSLike. Is it possible to have CMS behavior with AuthUser?

Answer

A site may have CMS Like behavior while using AuthUser without fancy footwork.

Create the CMS Menu. PmWiki already comes with a page dedicated to the page actions Site.PageActions. So, all we need to do is adjust this page to allow for role-based options. Here is an example.

(:if ! [ auth admin || authid ] :)
[[{$FullName}?action=login|$[login]]]
(:if [ auth admin || authid ]:)
[[{$FullName}?action=logout|$[logout]]]
(:if auth edit:)
· [[{$FullName}?action=edit|$[edit]]]
· [[{$FullName}?action=diff|$[history]]]
(:if auth admin:)
· [[{$FullName}?action=attr|$[attr]]]
· [[{$SiteGroup}.AuthUser?action=edit|$[users]]]

Notes

  • This recipe was last tested on PmWiki version: pmwiki-2.2.116
  • This recipe requires at least PmWiki version: any version with PmWiki.AuthUser

Releases

No releases, just information

See Also

Contributors

BenWilson August 23, 2006 -- Updated. BenWilson December 30, 2005 -- Initially Written

Comments

See discussion at AuthUserCMSLike-Talk


User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.