use MediaWiki\Revision\RevisionStore;
use MediaWiki\Revision\SlotRecord;
+/**
+ * @ingroup API
+ */
class ApiComparePages extends ApiBase {
/** @var RevisionStore */
*/
private function getRevisionById( $id ) {
$rev = $this->revisionStore->getRevisionById( $id );
- if ( !$rev && $this->getUser()->isAllowedAny( 'deletedtext', 'undelete' ) ) {
+ if ( !$rev && $this->getPermissionManager()
+ ->userHasAnyRight( $this->getUser(), 'deletedtext', 'undelete' )
+ ) {
// Try the 'archive' table
$arQuery = $this->revisionStore->getArchiveQueryInfo();
$row = $this->getDB()->selectRow(