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
Unknown Object (File)
Sun, Dec 1, 12:42 PM
Unknown Object (File)
Sun, Dec 1, 12:42 PM
Unknown Object (File)
Sun, Dec 1, 12:42 PM
Unknown Object (File)
Sun, Dec 1, 12:42 PM
Unknown Object (File)
Sun, Dec 1, 5:13 AM
Unknown Object (File)
Sun, Nov 24, 2:58 PM
Unknown Object (File)
Sat, Nov 23, 4:51 AM
Unknown Object (File)
Oct 14 2024, 1:41 AM
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