Page MenuHomePhabricator

Make limited information from archive available to everyone
Closed, ResolvedPublic

Description

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.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

For the record this goes back to 2014, since the fields were first exposed on Toolforge. I just never got around to filing an actual task before now.

Change 535279 had a related patch set uploaded (by Don-vip; owner: Don-vip):
[mediawiki/core@master] api: Make ApiQuery(All)DeletedRevisions accessible to everyone

https://gerrit.wikimedia.org/r/535279

Change 535279 merged by jenkins-bot:
[mediawiki/core@master] api: Make ApiQuery(All)DeletedRevisions accessible to everyone

https://gerrit.wikimedia.org/r/535279