Homec4science

Clean up "Audit Authority" code, at least mostly

Authored by epriestley <git@epriestley.com> on Jan 25 2017, 20:28.

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

Committed
epriestley <git@epriestley.com>Jan 25 2017, 22:08
Pushed
aubortJan 31 2017, 17:16
Parents
rPHb3912dd08848: Remove old Audit code "Action" transaction editing code
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHca182c7f48ca: Clean up "Audit Authority" code, at least mostly (authored by epriestley <git@epriestley.com>).Jan 25 2017, 22:08