Add NamespaceRestriction class so that BlockRestriction can handle namespaces.
authorDavid Barratt <dbarratt@wikimedia.org>
Tue, 30 Oct 2018 18:19:22 +0000 (14:19 -0400)
committerThalia <thalia.e.chan@googlemail.com>
Mon, 21 Jan 2019 14:19:39 +0000 (14:19 +0000)
commitbe27181956c738e2bcd5a1a01c63678d1dd36325
tree10113cb49d789f5073e274cc8fe6892f63a47ef7
parenta3bf4e67e5c996b8f6abe987b22eae8cdcb32ea9
Add NamespaceRestriction class so that BlockRestriction can handle namespaces.

This begins work on making namespaces a valid restriction type. The CRUD
operations of BlockRestriction can now handle namespaces. Since
NamespaceRestriction implements Restriction, enforcement should start working
immediately, but testing enforcement will come in a subsequent patch since it's
impossible to create them.

Bug: T204991
Change-Id: I7264b452d9ad788c146d6ea25d01d4d7cb5ac4f6
includes/Block.php
includes/block/BlockRestriction.php
includes/block/Restriction/AbstractRestriction.php
includes/block/Restriction/NamespaceRestriction.php [new file with mode: 0644]
includes/block/Restriction/PageRestriction.php
includes/block/Restriction/Restriction.php
includes/user/User.php
tests/phpunit/includes/BlockTest.php
tests/phpunit/includes/block/BlockRestrictionTest.php
tests/phpunit/includes/block/Restriction/NamespaceRestrictionTest.php [new file with mode: 0644]
tests/phpunit/includes/user/UserTest.php