Depending on what the user is authenticated as will output the inner text. Examples of usage are below.
(:if auth read:)and
(:if authid:)conditional markups instead. --Pm
This is a out of date as PmWiki now handles authentication differently.
How so? Have recent changes made this recipe invalid? If this script is outdated, is there a way to achieve the same conditional effect? --cboe
The $AuthFunction default method call in pmwiki.php has changed. Authentication in pmwiki.php now only remembers one password, whereas before it maintained a password set (Maybe other changes I haven't looked). This cookbook item will still work, BUT authentication is not the same as out-of-the-box pmwiki.php. -- MarkS
This recipe should still be valid even as of 2.0.beta29 -- it's just a different way of performing authentication than PmWiki's "default". Also, contrary to what MarkS writes - pmwiki still remembers all of the passwords entered by a user (or at least it's supposed to). If not, that's a bug in pmwiki.php . --Pm
(:if authenticated admin :)THE Administrator(:if:)
(:if authenticated read :)Read(:if:)
(:if authenticated edit :)Edit(:if:)
(:if authenticated attr :)Attr(:if:)
Output if the role is "admin": "THE AdministratorReadEditAttr"
Output if the role is "read": "Read"
Output if the role is "edit": "Edit"
Output if the role is "attr": "Attr"
Changes that effect the wiki infrastructure
$Conditions['authenticated'] = 'AuthenticatedAsRole(
$AuthFunction = 'BasicAuthUsingAuthenticatedAsRoleMethod';
Choose only one of the following files,
- AuthenticatedAs_V04.phpΔ (pmwiki-2.0.beta19, fixed a big problem where only admin passwords would authenticate)
Put "AuthenticatedAs_V??.php" into the cookbook/ directory and add the following line to local/config.php
or maybe the following if you have having troubles with your includes.
See discussion at AuthenticatedAsConditional-Talk