Last modified: 2009-04-08 21:00:11 UTC
(This would be nice to have, but probably not going to happen) in includes/parser/Parser.php Force the use of userCan() hook for templates ($wgNonincludableNamespaces is used now): else if ( $wgNonincludableNamespaces && in_array( $title->getNamespace(), $wgNonincludableNamespaces ) ) { becomes else if ( !$title->userCanRead() || $wgNonincludableNamespaces && in_array( $title->getNamespace(), $wgNonincludableNamespaces ) ) {
Note that *replacing* $wgNonincludableNamespaces with a userCanRead() check is not desirable, since that would eliminate the distinction between the ability to _read_ a template and _include_ it.
Sure, (though its not clear to me why the need to split _read_ and _include_ permissions, it must be useful) the idea is still the same: replace $wgNonincludableNamespaces with a function call (which calls userCan hook). One could reuse $title->userCan('include'). I know the code suggested above works, but I haven't run any performance metrics on it. Bottom line, for me, I would like to see OOriented fix to the permissions all through the code, through userCan hook.
Marking as INVALID. You're mixing userCan (which deals with rights) with a per-namespace config setting (which isn't related to user rights at all).