Page MenuHomePhabricator

When updating revisions in responset to commits, use the omnipotent viewer to pull diffs
ClosedPublic

Authored by epriestley on Mar 1 2021, 7:00 PM.
Tags
None
Referenced Files
F19494544: D21582.id51379.diff
Thu, Jan 8, 9:46 AM
F19303848: D21582.id51378.diff
Wed, Dec 24, 5:58 AM
F19092559: D21582.diff
Dec 3 2025, 5:48 PM
F19035887: D21582.diff
Nov 25 2025, 6:31 PM
F18953814: D21582.id51378.diff
Nov 12 2025, 8:13 AM
F18858860: D21582.id51379.diff
Nov 1 2025, 11:14 PM
F18816350: D21582.id51379.diff
Oct 21 2025, 6:17 AM
F18809856: D21582.diff
Oct 19 2025, 5:27 PM
Subscribers
None

Details

Summary

Ref T13625. See that task for discussion.

Currently, the Viewer when performing revision updates in response to commits may be an arbitrary low-privilege user (an Application, a disabled User, a bot, a mailing list, etc).

Today, this leads to an exception when trying to make API calls.

Ideally, we probably would not perform the update in these cases. However, performing the update isn't a policy violation and is generally less surprising than not performing it, so continue performing it for now: just use the omnipotent user to interact with the API.

Test Plan
  • Authored a commit as a bot user without permission to view the repository or revision.
  • Commented out a couple of caches, and used bin/repository reparse --publish ... to republish the commit.
    • Before: exception when trying to interact with the API.
    • After: clean publish.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable