瀏覽代碼

fix(pluginlist): fixed issue with plugin list, fixes #5068

Torkel Ödegaard 9 年之前
父節點
當前提交
958f97232f
共有 1 個文件被更改,包括 10 次插入1 次删除
  1. 10 1
      pkg/plugins/queries.go

+ 10 - 1
pkg/plugins/queries.go

@@ -24,7 +24,16 @@ func GetPluginSettings(orgId int64) (map[string]*m.PluginSettingInfoDTO, error)
 		}
 		}
 
 
 		// default to enabled true
 		// default to enabled true
-		opt := &m.PluginSettingInfoDTO{Enabled: true}
+		opt := &m.PluginSettingInfoDTO{
+			PluginId: pluginDef.Id,
+			OrgId:    orgId,
+			Enabled:  true,
+		}
+
+		// apps are disabled by default
+		if pluginDef.Type == PluginTypeApp {
+			opt.Enabled = false
+		}
 
 
 		// if it's included in app check app settings
 		// if it's included in app check app settings
 		if pluginDef.IncludedInAppId != "" {
 		if pluginDef.IncludedInAppId != "" {