HomePhabricator

Clean up "Audit Authority" code, at least mostly

Description

Clean up "Audit Authority" code, at least mostly

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.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T2393

Differential Revision: https://secure.phabricator.com/D17251

Details

Provenance
epriestleyAuthored on Jan 25 2017, 7:28 PM
epriestleyPushed on Jan 25 2017, 9:08 PM
Reviewer
chad
Differential Revision
D17251: Clean up "Audit Authority" code, at least mostly
Parents
rPb3912dd08848: Remove old Audit code "Action" transaction editing code
Branches
Unknown
Tags
Unknown
Tasks
T2393: Adds a "Needs Verification" state to Audits
Build Status
Buildable 15383
Build 20261: Run Core Tests