On 7/20/07, Daniel Cannon <cannon.danielc(a)gmail.com> wrote:
Also,
doesn't that transclusion hook break due to the parser cache?
We have $wgNonincludableNamespaces for this.
That was introduced in 1.10 and thus not useful here. I noted that the
parser cache can cause problems with this; however, the only way that
this could happen would be if a user who is allowed to access restricted
content saves a page transcluding a page in that restricted namespace.
If you know of a better way to prevent the transclusion of a
non-readable page in a readable page without the aid of
$wgNonincludableNamespaces, please do let me know.
You could ignore who the current user is and just check if the
included namespace has more restrictive permissions (possibly not
strictly more restrictive) than the including namespace. Otherwise
you have something that appears to work, but then a null edit by
another user breaks it.