Add namespace restrictions to Special:Block and API
authorThalia <thalia.e.chan@googlemail.com>
Fri, 14 Dec 2018 21:08:40 +0000 (21:08 +0000)
committerThalia <thalia.e.chan@googlemail.com>
Tue, 22 Jan 2019 12:48:55 +0000 (12:48 +0000)
commitf589214d0fc897312de523c0f1c6e5920648b891
tree2d1ada6c955f6797c0c2cd53dbebe13d47d5509a
parentccbe9f3590c052cb7f1ad5a7a873fe67c540b2eb
Add namespace restrictions to Special:Block and API

This adds a UI for blocking namespaces to Special:Block
and a namespacerestrictions parameter to the block API.

The number of namespace restrictions in a single block
is not limited as page restrictions are.

The checkbox allowing the blocker to specify whether
the target can edit their own user page is normally
disabled for a partial block, but is re-enabled if
the block is to the user talk namespace.

If the config $wgBlockAllowsUTEdit is set to false, the
checkbox will not appear, and the target will not be
able to edit their own user talk page if they are
sitewide-blocked, namespace-blocked from the user talk
namespace, or page-blocked from their user talk page.

Bug: T204986
Change-Id: I9e231ad109d7285486ec332b26780339592b8df7
includes/api/ApiBlock.php
includes/api/i18n/en.json
includes/api/i18n/qqq.json
includes/specials/SpecialBlock.php
languages/i18n/en.json
languages/i18n/qqq.json
resources/src/mediawiki.special.block.js
resources/src/mediawiki.special/block.less
tests/phpunit/includes/api/ApiBlockTest.php
tests/phpunit/includes/specials/SpecialBlockTest.php