MinuteElectron wrote:
The full story.
A few months ago in r29725
<http://svn.wikimedia.org/viewvc/mediawiki?view=rev&revision=29725>
Domas introduced a "shortcut" that bypassed the userCan hook when
$wgGroupPermissions['*']['read'] = true; as a performance enhancement.
This circumvented any further logic inside the userCan hook that may
apply read restriction so I reverted it (it had broke an extension --
and possibly others, made the behavior of the hook unintuitive, wasn't
documented, etc.). Apparently (according to Domas) he had asked both Tim
and Brion about it and they agreed upon it, so he reverted it back.
There isn't much more that can be done, maybe Brion will make a
definitive decision next time he is here -- but this is a major
regression so one would hope it is fixed somehow.
MinuteElectron.
Is calling wfRunHooks that expenseive? It returns almost immediately if no hooks
are registered as "userCan"; and Title::userCanRead returns anyway after the
hook if the user is allowed to read. I can't see why is the quick "shortcut"
necessary, when many other hooks get called during every request.