> > Also, are there any good reasons to continue checking > User::isBlocked()? If not, I think deprecating it would be a good idea.
+1 for deprecating it. I think the name of that function is misleading to begin with 'cause even before "Partial Blocks" there were other actions besides edit that a block could prevent (like 'sendemail'). On Sun, Nov 4, 2018 at 9:39 PM Kunal Mehta <[email protected]> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > Hi, > > On 11/2/18 12:58 PM, Alex Ezell wrote: > > *tl:dr;* On a wiki with the new Partial Blocks enabled (currently > > only testwiki), if the code is checking User::isBlocked() to > > determine edit rights, it should instead check User::isBlockedFrom( > > Title ). The code could also check isBlocked() && > > $block->isSitewide(). If it doesn’t, the code may block users that > > shouldn’t be blocked. > > Based on a quick codesearch[1], this affects a lot of extensions, and > MediaWiki core itself. It would be nice if bugs (or patches!) could be > filed against code that needs updating. > > Also, are there any good reasons to continue checking > User::isBlocked()? If not, I think deprecating it would be a good idea. > > [1] > https://codesearch.wmflabs.org/search/?q=-%3EisBlocked%5C(&i=nope&files= > &repos= > <https://codesearch.wmflabs.org/search/?q=-%3EisBlocked%5C(&i=nope&files=&repos=> > > - -- Legoktm > -----BEGIN PGP SIGNATURE----- > > iQIzBAEBCgAdFiEE+h6fmkHn9DUCyl1jUvyOe+23/KIFAlvfrU4ACgkQUvyOe+23 > /KLWYg/+LR3h0UjQwwomCba9VrnwvMYApsP7xHnZUvukMqF/mjNvKFnR1Rs/pEWj > 10IU0QMVxBB6cA47xLY9oYWoMTs6uO4qcLgJrHGxsHdaklOeaukqTZZWh4ubdhs1 > KHJOoxNAfzZvD7f0IPsT1w5mlu68ehAMV5OfLH5QtqhViOBh8yCUSPn5dwpeY1k2 > 28Ped42jst4U1PUCVELSf5hQe7KUCvE0xr5mcnT0rq5rta7nw9nCXeIaIQLUSP/i > ouh0ZE1vf3ScsqmM0AV2hqc2GOdtzwaMPPKXFTbP3UQjAXWYDOs7UdITLOGbQupj > JAW3vEEZEu6xd0TcvuQ1o5S9szHVxqJUOelqaZMn/w+8xOBfAQ4wcskqaEcE1Y2f > X0pneuAx473kJOfGVEv/RbAnf8Vc9hXkRoSK7OY6f0tJPYyMreWbc7H15gUVRA4X > jzcAH6VYOxxUX4trznNArmnGIisjylweZlJvTSWUawTzMNCUEieD4hWKmey8sX1r > YhQsoyuy4JkumXqY6Eu9XkVCHNQg+JZkRfGB5EudzoUAqlL5D1NhcHx+1EhaELQd > qNNVtPMH79vDUHs18Hn/np9eX8cHIyfDGhI5yHt4m3bx111p3I/hOo57yaV9WbrP > 3C/USolKKxNUPgoPPP/3KKa+skDt9wKvPIU5lvDd9F9TKbm8hcc= > =q47C > -----END PGP SIGNATURE----- > > _______________________________________________ > Wikitech-l mailing list > [email protected] > https://lists.wikimedia.org/mailman/listinfo/wikitech-l _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
