PLT-7407: Back-end plugins (#7409)
* tie back-end plugins together * fix comment typo * add tests and a bit of polish * tests and polish * add test, don't let backend executable paths escape the plugin directory
Этот коммит содержится в:
@@ -150,7 +150,7 @@ func InitApi(full bool) {
|
||||
BaseRoutes.PublicFile = BaseRoutes.Root.PathPrefix("/files/{file_id:[A-Za-z0-9]+}/public").Subrouter()
|
||||
|
||||
BaseRoutes.Plugins = BaseRoutes.ApiRoot.PathPrefix("/plugins").Subrouter()
|
||||
BaseRoutes.Plugin = BaseRoutes.Plugins.PathPrefix("/{plugin_id:[A-Za-z0-9\\_\\-]+}").Subrouter()
|
||||
BaseRoutes.Plugin = BaseRoutes.Plugins.PathPrefix("/{plugin_id:[A-Za-z0-9\\_\\-\\.]+}").Subrouter()
|
||||
|
||||
BaseRoutes.Commands = BaseRoutes.ApiRoot.PathPrefix("/commands").Subrouter()
|
||||
BaseRoutes.Command = BaseRoutes.Commands.PathPrefix("/{command_id:[A-Za-z0-9]+}").Subrouter()
|
||||
|
||||
@@ -110,5 +110,5 @@ func TestPlugin(t *testing.T) {
|
||||
_, resp = th.SystemAdminClient.RemovePlugin("bad.id")
|
||||
CheckNotFoundStatus(t, resp)
|
||||
|
||||
th.App.Srv.PluginEnv = nil
|
||||
th.App.PluginEnv = nil
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user