Page MenuHomePhabricator

Pass viewer to all typeahead controls
AbandonedPublic

Authored by epriestley on Feb 14 2014, 6:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 17, 11:34 PM
Unknown Object (File)
Sun, Mar 17, 10:00 PM
Unknown Object (File)
Sun, Mar 17, 9:30 PM
Unknown Object (File)
Feb 23 2024, 2:32 AM
Unknown Object (File)
Feb 4 2024, 3:00 AM
Unknown Object (File)
Jan 30 2024, 8:41 AM
Unknown Object (File)
Jan 24 2024, 9:37 AM
Unknown Object (File)
Jan 1 2024, 9:50 AM
Subscribers

Details

Summary

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.

Test Plan

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.