From 0eff3f59ad290b1f29f019c1cf97dc498890368c Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 18 Dec 2011 14:07:01 +0000 Subject: [PATCH] Pass the User object to Revision::userCan() --- includes/api/ApiParse.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php index 03910516d4..5763f39833 100644 --- a/includes/api/ApiParse.php +++ b/includes/api/ApiParse.php @@ -83,7 +83,7 @@ class ApiParse extends ApiBase { if ( !$rev ) { $this->dieUsage( "There is no revision ID $oldid", 'missingrev' ); } - if ( !$rev->userCan( Revision::DELETED_TEXT ) ) { + if ( !$rev->userCan( Revision::DELETED_TEXT, $this->getUser() ) ) { $this->dieUsage( "You don't have permission to view deleted revisions", 'permissiondenied' ); } -- 2.20.1