[pmwiki-devel] Advice needed for CondAuth and cookbook sequencing

DaveG pmwiki at solidgone.com
Wed Feb 17 18:58:42 CST 2010


Hi,

I'm looking for suggestions on how to manage cookbook sequencing. The 
scenario is a user who is using BlogIt, and also wants to enable the 
PmWiki 'draft' functionality for non-BlogIt pages.

Both Drafts and BlogIt call functions which basically populate the 
password/authorization cache, effectively locking in the privs set at 
that point. (Drafts calls CondAuth, and BlogIt makes a call to 
PageTextVar.) This means that it is not possible to use both BlogIt and 
Drafts.

A workable solution would be to selectively enable either Drafts or 
BlogIt, and not enable both at once. This is reasonable, but often the 
check seems to involve a call to a 'caching' function (CondAuth to check 
if a user has Edit permissions for example), which leads back to the 
original problem.

Short-term workaround: In my experience calls to CondAuth() (and thus 
RetrieveAuthPage() and then PmWikiAuth()) tend to be the cause of these 
kinds of problems. Is there perhaps a 'cheap-mans' alternative to 
CondAuth/PmWikiAuth which doesn't do caching? How have others handled 
this kind of thing?

Longer-term: It seems like it would make sense for functions which cache 
operations to accept a parameter disabling the caching operation for 
that call. I haven't looked too much in to the feasibility of this, and 
suspect it would might be a complex change to make, but it would at 
least be transparent to existing code, and provide an option in cases 
where we need to allow subsequent changes to objects.


  ~ ~ Dave



More information about the pmwiki-devel mailing list