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
F19035887: D21582.diff
Tue, Nov 25, 6:31 PM
F18953814: D21582.id51378.diff
Wed, Nov 12, 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
F18806001: D21582.id.diff
Oct 18 2025, 5:20 PM
F18799303: D21582.diff
Oct 17 2025, 1:07 PM
F18766244: D21582.id.diff
Oct 7 2025, 3:44 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