[pmwiki-devel] check authorization requirements for a given page
Hans
design5 at softflow.co.uk
Thu Oct 1 14:15:01 CDT 2009
Thursday, October 1, 2009, 7:08:19 PM, Frank wrote:
> How can I check (with php) the authentication requirements for an action
> at a *given page*?
> - not the authorization level of the *current user* like with function
> CondAuth)
> I would like to allow the use of sensitive features like <script> or
> <embed> only on
> pages that require @editors or admin (and enable captchas for editing on
> all other pages)
use per page customization as described here:
http://pmwiki.org/wiki/PmWiki/GroupCustomizations
and within your per page customization file (or conditional if you set
it up in config.php)
use the condition
if (CondAuth($pagename,'edit') {
....enable sensitve features here...
}
it will allow you to enable features only if the user has edit
authorisation for the particular page.
Hans
More information about the pmwiki-devel
mailing list