[pmwiki-users] Security API

Patrick R. Michaud pmichaud at pobox.com
Tue Feb 22 18:59:30 CST 2005


Sure, you can override the authorization function that PmWiki
uses to do whatever you want.  The name of the authorization
function is given by the $AuthFunction variable, and it
expects to be called as:

   $AuthFunction($pagename, $auth, $prompt)

where $pagename is the name of the page being requested,
      $auth is the type of access (read, edit, upload, admin, attr)
      $prompt == true means to prompt user for a password, while
          false means don't prompt

So, if you have a custom authorization function called 'MyAuth',
you would simply set $AuthFunction='MyAuth'; to use it instead
of PmWiki's default.

Take a look at scripts/httpauth.php for an example of a custom 
authorization function (httpauth.php switches PmWiki to use 
HTTP-Basic authentication instead of prompting via a form).

Pm
 
On Wed, Feb 23, 2005 at 11:41:15AM +1100, Larry Lewis wrote:
> We have a login database for people using various parts of the system, 
> really only 4 levels in general Admin, Developer, Member and visitor 
> what I would like to do is setup PITS in various neat ways... For 
> example a Developer might want a change to the software support library 
> so he needs to be able to edit pages there, we will also like members to 
> be able to read the PITS information but not be able to submit anything.
> 
> Hooking up the wiki to our system is obviously my job, but could someone 
> see there way clear to implementing the wiki side .. by that I mean  
> someone wants to read a group/page/whatever there is a call out like 
> xxx( group, page, READ ) and I can return true or false .. if a username 
> is required for an edit same sort of thing. Yes I do realise this will 
> be slower than the inbuilt stuff but adding 5,000 passwords to the 
> config.txt aint really what I would like to do .. by the way this is one 
> sample I also want members to be able to request add-ons changes et al.
> 
> Thanks .. Larry
> 
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://pmichaud.com/mailman/listinfo/pmwiki-users



More information about the pmwiki-users mailing list