Page MenuHomePhabricator

Clean up "Audit Authority" code, at least mostly
ClosedPublic

Authored by epriestley on Jan 25 2017, 7:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 16, 2:19 AM
Unknown Object (File)
Fri, Nov 15, 6:14 PM
Unknown Object (File)
Thu, Nov 14, 6:35 AM
Unknown Object (File)
Thu, Nov 14, 6:26 AM
Unknown Object (File)
Wed, Nov 13, 9:49 PM
Unknown Object (File)
Wed, Nov 13, 12:24 PM
Unknown Object (File)
Wed, Nov 13, 12:21 PM
Unknown Object (File)
Tue, Nov 12, 7:18 PM
Subscribers
None

Details

Summary

Ref T2393. We had three copies of this code ("which packages/projects can a user accept on behalf of?"). I removed one in D17250. This consolidates the other two.

This still isn't perfect and it should probably live in a Query or something some day, but there's some weird stuff going on with the viewer in the editor context, and at least the code handles the viewer correctly now and isn't living somewhere weird and totally unrelated to auditing, and the callsites don't need to do a bunch of extra work.

This also moves towards fixing the "re-accept if you've already accepted but then a new package you have authority over was added" bug, which we fixed recently in Differential. This should be less common in Audit, but should still be fixed.

Test Plan

Viewed and audited commits with a mixture of user, package, and project auditors. Saw actions apply to the expected set of auditors.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Jan 25 2017, 8:44 PM
This revision was automatically updated to reflect the committed changes.