[pmwiki-devel] check authorization requirements for a given page
Frank Schweickert
f.schweickert at uva.nl
Wed Oct 21 10:51:12 CDT 2009
Dear all,
I wanted to find out whether an edit password is set for a given page
and I learned from Hans that PageVar($pagename, '$PasswdEdit'))
should be empty if no edit password is set along the attr cascade.
While that seems to be a sufficient condition for no edit password,
it doesn't seem to be necessarily empty for unprotected pages.
Right now (version 2.2.6) $PasswdEdit is set to "(protected)"
even for that anyone could edit right away, such as Main, PmWiki groups.
(And I would like to enable the captcha recipe in such cases)
However, I found that PasswdEdit will be empty again as soon as
I access the attr-page by sending my admin password.
So what is a sufficient and necessary condition for
"no edit password set"?
In pmwiki.php I found in function PasswdVar:
SDV($PasswdVarAuth, 'attr');
if ($PasswdVarAuth && !@$page['=auth'][$PasswdVarAuth]) return
'(protected)';
But I do not understand what that means.
Best regards,
Frank
More information about the pmwiki-devel
mailing list