Add mechanism for temporary user rights
authorGergő Tisza <tgr.huwiki@gmail.com>
Thu, 11 Jul 2019 17:22:20 +0000 (19:22 +0200)
committerTim Starling <tstarling@wikimedia.org>
Wed, 17 Jul 2019 01:53:14 +0000 (11:53 +1000)
commit659db7bddd607ae6e5877f31e54ef8496a7ad336
treeecef43970f189127e452bcbd11b60250722aed80
parentbe07389e2af93d584594e8ac8c41040ab0d752e5
Add mechanism for temporary user rights

Add a mechanism for adding temporary user rights that only exist
for the current request. This is occasionally needed to let normal
users act with a bot flag; traditionally the fact that User::$mRights
was public has been abused to do it, but I88992403 broke that.

Bug: T227772
Change-Id: Ife8f9d8affa750701e4e5d646ed8cd153c1d867b
RELEASE-NOTES-1.34
includes/Permissions/PermissionManager.php
tests/phpunit/includes/Permissions/PermissionManagerTest.php