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