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
F19918565: D21582.diff
Sat, Apr 4, 6:35 PM
F19911053: D21582.id.diff
Thu, Apr 2, 10:43 AM
F19909845: D21582.id51379.diff
Thu, Apr 2, 2:52 AM
F19881908: D21582.diff
Thu, Mar 19, 3:13 AM
F19815962: D21582.id51379.diff
Mar 5 2026, 2:11 AM
F19815152: D21582.id.diff
Mar 4 2026, 6:40 PM
F19802645: D21582.id51379.diff
Mar 1 2026, 5:54 PM
F19801250: D21582.id51378.diff
Feb 28 2026, 10:07 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