This would best involve revisiting the rights checks in ApiQueryDeletedRevisions and ApiQueryAllDeletedRevisions. ApiQueryDeletedrevs should not be updated, as it is deprecated.
This should mirror the information that is available via the replicas in Toolforge, and will be largely similar to rMW4d2965cf72fb: api: Update QueryFilearchive to provide information to everyone with the main difference being that ApiQueryRevisionBase already handles the RevDel checks.
More specifically, it'll mean the following changes:
- Remove the rights checks for 'deletedhistory' at the tops of the execute() methods.
- Remove the comments about "shouldn't be able to get here without 'deletedhistory'", since that's no longer true.
- Probably use a better error message for the existing fetchContent checks (near ApiQueryDeletedRevisions.php line 99 and ApiQueryAllDeletedRevisions.php line 148). The check itself is the same as the 'metadata' check in 4d2965c.
- Add a rights check for 'deletedhistory' when $this->fld_comment or $this->fld_parsedcomment is true, just like the one for fld_description in 4d2965c, near the existing fetchContent checks.