[MM-49929] Work templates: allow simple users to list marketplace plugins (#22151)
Этот коммит содержится в:
@@ -571,24 +571,26 @@ func (a *App) GetMarketplacePlugins(filter *model.MarketplacePluginFilter) ([]*m
|
||||
plugins = p
|
||||
}
|
||||
|
||||
// Some plugin don't work on cloud. The remote Marketplace is aware of this fact,
|
||||
// but prepackaged plugins are not. Hence, on a cloud installation prepackaged plugins
|
||||
// shouldn't be shown in the Marketplace modal.
|
||||
// This is a short term fix. The long term solution is to have a separate set of
|
||||
// prepacked plugins for cloud: https://mattermost.atlassian.net/browse/MM-31331.
|
||||
license := a.Srv().License()
|
||||
if license == nil || !license.IsCloud() {
|
||||
appErr := a.mergePrepackagedPlugins(plugins)
|
||||
if !filter.RemoteOnly {
|
||||
// Some plugin don't work on cloud. The remote Marketplace is aware of this fact,
|
||||
// but prepackaged plugins are not. Hence, on a cloud installation prepackaged plugins
|
||||
// shouldn't be shown in the Marketplace modal.
|
||||
// This is a short term fix. The long term solution is to have a separate set of
|
||||
// prepacked plugins for cloud: https://mattermost.atlassian.net/browse/MM-31331.
|
||||
license := a.Srv().License()
|
||||
if license == nil || !license.IsCloud() {
|
||||
appErr := a.mergePrepackagedPlugins(plugins)
|
||||
if appErr != nil {
|
||||
return nil, appErr
|
||||
}
|
||||
}
|
||||
|
||||
appErr := a.mergeLocalPlugins(plugins)
|
||||
if appErr != nil {
|
||||
return nil, appErr
|
||||
}
|
||||
}
|
||||
|
||||
appErr := a.mergeLocalPlugins(plugins)
|
||||
if appErr != nil {
|
||||
return nil, appErr
|
||||
}
|
||||
|
||||
// Filter plugins.
|
||||
var result []*model.MarketplacePlugin
|
||||
for _, p := range plugins {
|
||||
|
||||
Ссылка в новой задаче
Block a user