Fix the CurrentUser request context propagation

To properly propagate the CurrentUser for the request scoped injection
which happens in a project import thread we must not get the CurrentUser
injected into the constructor of the ProjectRestEndpoint as it is a
singleton, instantiated at the plugin loading time when the CurrentUser
is just the PluginUser.

Instead, get the Provider<CurrentUser> in the constructor and execute it
in the context of the current request later.

Change-Id: I46dce05870cb049b016114057ec20a89382acf99
1 file changed
tree: f8127d3c31fe8b7a8a95a3ca32027b1bedbbe3c5
  1. .settings/
  2. lib/
  3. src/
  4. .buckconfig
  5. .gitignore
  6. BUCK
  7. LICENSE
  8. pom.xml
  9. VERSION