MinuteElectron wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
okparanoid wrote:
Don't understand why this was reverted without any explanation and consensus finding...
isn't Usercan an official hook of mediawiki ?
Doing this is simply bypass this documented hook !?
Don't know how duesentrieb can rewrite extension since the hook is
bypassed.
Perhaps i have missing something...
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.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkflm/sACgkQkJvUlhoE3wTDOgCfX/s8qmO5zFen0yCqPrNxz486 rxUAnj3LmrCPh/NhGx0n1h+GJwDWw6QG =efoJ -----END PGP SIGNATURE-----
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
So is it possible to add an condition to the line ?
if ($wgGroupPermissions['*']['read']) && "usercan hook not activated"
perhaps any boolean can store if the hook is to be activated, why not set this boolean in LocalSettings.php and use it to any other place of the code to not penalize perfomance of wiki which dont use the user can hook ???!