Remove use of Title::quickUserCan

Bug: T244927
Change-Id: I6d7fb8825d512d1bf9c0005289b28704412975c3
This commit is contained in:
DannyS712 2020-02-12 06:48:13 +00:00
parent 5f2349fdd7
commit cb1b9b5f20

View file

@ -225,7 +225,8 @@ class VisualEditorHooks {
* @return bool
*/
private static function isSupportedEditPage( Title $title, User $user, WebRequest $req ) {
if ( $req->getVal( 'action' ) !== 'edit' || !$title->quickUserCan( 'edit' ) ) {
if ( $req->getVal( 'action' ) !== 'edit' || !MediaWikiServices::getInstance()
->getPermissionManager()->quickUserCan( 'edit', $user, $title ) ) {
return false;
}