* Fix plugin /public handling for subpaths
Plugins support a `public` folder in the bundle automatically being accessible at `<site_url>/plugins/<plugin_id/public/`, but it seems support for a `site_url` with a subpath has been broken for some time.
I tried to figure out when this stopped working, but gave up after a while and just focussed on the requisite changes plus tests.
* simplify comment
* more testing coverage, and simpler diff
* try cleaning up plugins after tests
* skip TestServePluginPublicRequest to isolate build issue
* Revert "skip TestServePluginPublicRequest to isolate build issue"
This reverts commit 62d0e4e427c7cf7b7f9b09202ce10cd5f1a56bca.
* do th.TearDown last by using t.Cleanup vs. defer
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* Move pluginCommands into Channels
We move pluginCommands, pluginCommandsLock
into Channels.
We also move the plugin related route handlers
under Channels and move the init code under
NewChannels. To achieve this, the router initialization
is bumped up.
Along with it, we clean up some App methods
which were just wrappers over Channel methods.
Instead, we call the Channel method directly
to make things more readable and easy to understand.
```release-note
NONE
```
* fix tests
```release-note
NONE
```
* Move Channels into App
In this PR, we make Channels as part of App
instead of Server. This is part of the transition period
of moving fields from Server to Channels.
For now, Channels contains Server. So the hierarchy is
App -> Channels -> Server.
And as a first step, we also move httpService to Channels.
```release-note
NONE
```
* Fixing another test
```release-note
NONE
```
* new method
```release-note
NONE
```
* Save access on plugin env during ServePluginPublicRequest
* Cover solution with the offending specs
* Apply PR suggestions
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>