Ref T4420. I might need/want this to modernize datasources (for instance, if we let datasources declare that they're static and we should just ship down the results with the page, we need to be able to pass a viewer), and it also lets us make the username config (which sorts your username first) work more consistently.
Details
- Reviewers
btrahan - Maniphest Tasks
- T4420: Modernize typeahead datasources
Clicked every app homescreen, grep, lint, tried to hist most of the other interfaces. Verified username makes it into JS correctly.
Diff Detail
- Repository
- rP Phabricator
- Branch
- type1
- Lint
Lint Passed - Unit
Tests Passed
Event Timeline
the new PhabricatorUser() ones strike me as sketchy?
src/applications/differential/field/specification/DifferentialCCsFieldSpecification.php | ||
---|---|---|
56 | uh? |
Yeah, they're a bit sketchy. There are two sites:
- In DifferentialFields, we have no reasonable access to the viewer, and won't reasonably until T3886.
- The Differential AddComment control is theoretically dead soon (T2222), or I'll fix it if I don't kill it.
In these cases, passing an empty user doesn't do anything bad, it just removes all the viewer's permissions and makes these controls render like they would for a logged-out user. That means the "put your username first" rule doesn't work, but that's not terrible for these four fields.
I don't really need this for anything immediately (some guy just started showing up above me, and I wanted to fix that), so let me hold this until I figure out the AddComment stuff at least and I can look at threading the viewer into fields in advance of T3886 too.
HEAD is miles ahead of this now and we don't have much of a specific need for it. I might pick this up at some point but don't plan to pursue it for now -- pile of work for a barely perceptible change.