diff options
author | Vedmaka <god.vedmaka@gmail.com> | 2019-04-09 09:58:04 +0300 |
---|---|---|
committer | daniel <dkinzler@wikimedia.org> | 2019-05-29 17:41:07 +0200 |
commit | 7faa7a7420866ec685863c1d6c530bd4999da643 (patch) | |
tree | 93ca343aa8cb51b0c0bac8a18e88bce6cfc28fbc /tests/phpunit/includes/api/ApiMoveTest.php | |
parent | ceb1cd276fd6b46bf063b30232dd54af2c613b01 (diff) | |
download | mediawikicore-7faa7a7420866ec685863c1d6c530bd4999da643.tar.gz mediawikicore-7faa7a7420866ec685863c1d6c530bd4999da643.zip |
Factors out permissions check from User into PermissionManager service
The following methods should are factored out of the User class into PermissionManager, leaving only deprecated stubs:
- User::isAllowed -> PermissionManager::userHasRight
- User::getRights -> PermissionManager::getUserPermissions
- User::groupHasPermission -> PermissionManager::groupHasPermission
- User::getGroupPermissions -> PermissionManager::getGroupPermissions
-User::getGroupsWithPermission -> PermissionManager::getGroupsWithPermission
- User::groupHasPermission -> PermissionManager::groupHasPermission
- User::isEveryoneAllowed -> PermissionManager::isEveryoneAllowed
- User::getAllRights -> PermissionManager::getAllPermissions
Depends-On: I258f02e286b6ba0387e1bff540a744fafb03dc55
Depends-On: Ie4cedf457eaaa93ec3055c37539322855e02ce26
Depends-On: Id274f240d687efa61cb9f7a15033ae2a7a532083
Bug: T218558
Bug: T223294
Change-Id: Ia0d840b772ea5f20c9594ce151cc57adc270e48b
Diffstat (limited to 'tests/phpunit/includes/api/ApiMoveTest.php')
-rw-r--r-- | tests/phpunit/includes/api/ApiMoveTest.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/phpunit/includes/api/ApiMoveTest.php b/tests/phpunit/includes/api/ApiMoveTest.php index d880923d3fd1..04a4d8f922b4 100644 --- a/tests/phpunit/includes/api/ApiMoveTest.php +++ b/tests/phpunit/includes/api/ApiMoveTest.php @@ -212,6 +212,7 @@ class ApiMoveTest extends ApiTestCase { ChangeTags::defineTag( 'custom tag' ); $this->setGroupPermissions( 'user', 'applychangetags', false ); + $this->overrideMwServices(); $id = $this->createPage( $name ); @@ -294,6 +295,7 @@ class ApiMoveTest extends ApiTestCase { $name = ucfirst( __FUNCTION__ ); $this->mergeMwGlobalArrayValue( 'wgNamespacesWithSubpages', [ NS_MAIN => true ] ); + $this->overrideMwServices(); $pages = [ $name, "$name/1", "$name/2", "Talk:$name", "Talk:$name/1", "Talk:$name/3" ]; $ids = []; @@ -379,6 +381,7 @@ class ApiMoveTest extends ApiTestCase { $name = ucfirst( __FUNCTION__ ); $this->setGroupPermissions( 'sysop', 'suppressredirect', false ); + $this->overrideMwServices(); $id = $this->createPage( $name ); |