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
F14092614: D17251.diff
Mon, Nov 25, 7:04 AM
Unknown Object (File)
Fri, Nov 22, 6:18 PM
Unknown Object (File)
Fri, Nov 22, 6:18 PM
Unknown Object (File)
Fri, Nov 22, 6:17 PM
Unknown Object (File)
Fri, Nov 22, 6:07 PM
Unknown Object (File)
Fri, Nov 22, 5:51 PM
Unknown Object (File)
Sat, Nov 16, 2:19 AM
Unknown Object (File)
Fri, Nov 15, 6:14 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
Branch
audit3
Lint
Lint Passed
SeverityLocationCodeMessage
Advicesrc/applications/repository/storage/PhabricatorRepositoryCommit.php:192XHP16TODO Comment
Unit
Tests Passed
Build Status
Buildable 15377
Build 20254: Run Core Tests
Build 20253: arc lint + arc unit

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.