[pmwiki-users] How to detect if a page has @nopass for the read password
Eemeli Aro
eemeli at gmail.com
Tue Jul 13 06:41:27 CDT 2010
On 13 July 2010 12:07, Randy Brown <alongkiss at aprivatespot.com> wrote:
> That's great, Eemeli! I'm amazed how quickly you came up with that.
>
> It works for everything I've tried so far. I'll let you know if I find a case that fails.
>
> Question: In a previous version you cautioned that it depends on not having a custom $AuthFunction, on no recipe fiddling with $NoHTMLCache in an odd way, and on RetrieveAuthPage() getting called at least once before PVs are resolved. Does that disclaimer still apply? If not, are there any other special considerations for users to keep in mind?
A custom $AuthFunction may still mess things up, but that's rather
unlikely: PageListProtect checks the same $page['=passwd'] array, so a
proper custom $AuthFunction ought to fill it the same way as
PmWikiAuth() does. The other two concerns were particular to the 2nd
attempt.
Which actually raises an interesting point: is it really sensible that
page variables don't obey any permissions, but are always accessible?
Page text variables are protected, mind. Would it really give a huge
performance hit if PageVar() also checked for permissions before
processing a page variable?
> Also, shall I post your code on the conditional markup samples (http://www.pmwiki.org/wiki/Cookbook/ConditionalMarkupSamples), so others will come upon it?
Sure, go ahead.
eemeli
> Randy
>
> On Jul 13, 2010, at 3:04 AM, Eemeli Aro wrote:
>> This should work for the general case, but tell me if it
>> doesn't.
>
>
More information about the pmwiki-users
mailing list