Page MenuHomePhabricator

Remove deprecated 'bigdelete' check in PermissionManager
Open, Needs TriagePublic

Description

Following T288759, the relevant logic was moved to DeletePage. An analysis of existing callers can be found at T288281, and I'm copying the conclusions here as well:

I don't see any showstopper or anything that prevents us from moving the logic from Title to DeletePage and make it not be page-wise but deletion-wise, as long as the following things are done/kept in mind:

  • The old behaviour should be deprecated: soft deprecation and a mention in the release notes. Hard deprecation is impossible as callers have no way to specify whether they want that code to be executed or not.
  • Add a notice to Tech/News once the old code is removed, in particular for the change to ApiQueryInfo behaviour
  • It'd be nice if we could migrate the methods listed above that also delete pages to the new DeletePage service
    • I'd like to better understand the code in Translate and see if it can be migrated, too
  • Obviously, make sure that deletion-related code in core (DeleteAction, FileDeleteForm, ApiDelete, WikiPage) will still perform the bigdeletion check.

So the rough plan would be:

  • Deprecate the code in question -- done in r714383 (1.37)
  • Migrate callers of WikiPage::doDeleteArticleReal to use DeletePage. In particular, callers that already check permissions should use deleteIfAllowed, which does the permission checks for them and also checks for big deletions.
  • Advertise the upcoming change to ApiQueryInfo (probably tech news)
  • Remove the check