[pmwiki-users] meaning of "=protectsafe" (was: (:pagelist:) broken ...)

ThomasP pmwikidev at sigproc.de
Sun May 20 09:00:07 CDT 2007


On Sun, May 20, 2007 14:35, ThomasP wrote:
> On Sat, May 19, 2007 20:26, Patrick R. Michaud wrote:
>>> More critical are the two remaining fields. Therefore the question:
>>> what
>>> is the exact meaning of
>>>
>>> '=protectexclude' and
>>> '=protectsafe'
>>
>> These aren't fields of the $page array (returned by the authfunction) --
>> they're specific only to pagelist.
>>
>> In other words, I don't think $AuthFunction has to worry about these.
>>
>
> Well, I know very well. But the question for me is how should I set
> $page['=passwd'] such that in the end the behaviour of (:pagelist:) is
> acceptable:
>
>    if (!$page['=passwd']['read']) $opt['=protectsafe'][$pn] = 1;
>
> I would readily implement this straight as you said (something equivalent
> to "Is there any user who may not read the page?"), but it would take a
> while, as all user records would have to be scanned.
>
> Therefore my seek for some simplification, and therefore the question for
> the meaning, especially of "protectsafe". There will be some specific
> reason why one would like to know whether ANY read restriction exists on
> the page concerned.
>

Ok, I can see now: it is an optimization for not having to look up for
every single user whether the page is read-allowed for him/her, but rather
to decide by the once determined feature that no read password is set.

I will set $page['=passwd']['read'] to "1" whenever the page may not be
read by the GuestUser group.

Thomas





More information about the pmwiki-users mailing list