[MM-49929] Work templates: allow simple users to list marketplace plugins (#22151)

Этот коммит содержится в:
Julien Tant
2023-01-26 09:08:05 -07:00
коммит произвёл GitHub
родитель 1880297a90
Коммит 7bfca605e1
4 изменённых файлов: 86 добавлений и 18 удалений

Просмотреть файл

@@ -89,6 +89,7 @@ type MarketplacePluginFilter struct {
Platform string
PluginId string
ReturnAllVersions bool
RemoteOnly bool
}
// ApplyToURL modifies the given url to include query string parameters for the request.
@@ -104,6 +105,7 @@ func (filter *MarketplacePluginFilter) ApplyToURL(u *url.URL) {
q.Add("enterprise_plugins", strconv.FormatBool(filter.EnterprisePlugins))
q.Add("cloud", strconv.FormatBool(filter.Cloud))
q.Add("local_only", strconv.FormatBool(filter.LocalOnly))
q.Add("remote_only", strconv.FormatBool(filter.RemoteOnly))
q.Add("platform", filter.Platform)
q.Add("plugin_id", filter.PluginId)
q.Add("return_all_versions", strconv.FormatBool(filter.ReturnAllVersions))