[pmwiki-users] CondAuth
Hans
design5 at softflow.co.uk
Thu May 10 08:31:11 CDT 2007
http://www.pmwiki.org/wiki/PmWiki/Functions says
CondAuth ($pagename, 'auth level'):
CondAuth implements the ConditionalMarkup for (:if auth level:).
For instance CondAuth($pagename,'edit') is true if authorisation
level is 'edit'. Use inside local configuration files to build
conditionals with a check of authorisation level, similar to using
(:if auth level:) on a wiki page.
http://www.pmwiki.org/wiki/Cookbook/ConditionalMarkupSamples says:
What are the "If Auth" equivalents for a skin.php file?
$page = RetrieveAuthPage($pagename, 'read', false, READPAGE_CURRENT);
if ($page['=auth']['read']) /* visitor has read permission */
if ($page['=auth']['edit']) /* visitor has edit permission */
if ($page['=auth']['attr']) /* visitor has attr permission */
if ($page['=auth']['admin']) /* visitor has admin permission */
Which is the better or correct approach?
~Hans
More information about the pmwiki-users
mailing list