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
F18816350: D21582.id51379.diff
Tue, Oct 21, 6:17 AM
F18809856: D21582.diff
Sun, Oct 19, 5:27 PM
F18806001: D21582.id.diff
Sat, Oct 18, 5:20 PM
F18799303: D21582.diff
Fri, Oct 17, 1:07 PM
F18766244: D21582.id.diff
Tue, Oct 7, 3:44 PM
F18732159: D21582.diff
Sep 30 2025, 4:41 PM
F18642400: D21582.diff
Sep 18 2025, 11:45 PM
F18642359: D21582.diff
Sep 18 2025, 11:41 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