I've found a clumsy solution, I think:
## Config file code to allow test of whether a page's password is world
readable;
## $Pagereadpswd refers to the page's read attribute, ignoring its inherited
value
$Pagereadpswd = "(trim(@\$page['passwdread']))";
$FmtPV['$Pagereadpswd'] = $Pagereadpswd;
Then in markup put this:
(:if ( equal "{*$Pagereadpswd}" "@nopass" ) or
( ( equal "{*$Pagereadpswd}" "" ) and ( equal
"{{*$Group}.GroupAttributes$Pagereadpswd}" "@nopass" ) ):)
Randy
P.S. Does anyone have a better solution? Do you think the core should somehow
make this unnecessary? What would be a good change to the core?
On Jul 12, 2010, at 10:15 AM, Randy Brown wrote:
> I'm using AuthUser. Version pmwiki-2.2.0-beta65 (and possibly later versions)
> allowed me to test whether a page was world readable by checking the value of
> {*$PasswdRead}. In the current version (pmwiki-2.2.17) that ability now seems
> to be gone for users without attr authorization: they now just see
> "(protected)" even if they have the right to read the page.
>
> Is there another way to write a conditional to detect whether a page's read
> password is @nopass?
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users