Page MenuHomePhabricator

Consider refactoring the is-the-user-allowed-to-make-this-edit code and is-this-edit-worth-emitting-an-update code to be one set of code
Open, MediumPublic

Description

Geno observed that our code in PageEditingHandler::onRecentChange_save and our code in ZObjectAuthorization::getRequiredEditRights are doing closely-related work, both using the output of a ZObjectDiffer, but are different, and could potentially be combined.

OTOH, the fundamentals of what they're doing ("what's the right needed for each change here?" vs. "what's the simplest label that can describe this change?") are a bit different, so it might be hard to reconcile.