feat(apps): more work on plugin dashboard sync

This commit is contained in:
Torkel Ödegaard
2016-07-08 13:41:46 +02:00
parent 85be7dd902
commit 68a8d9bc91
5 changed files with 25 additions and 18 deletions

View File

@@ -46,6 +46,11 @@ func SaveDashboard(cmd *m.SaveDashboardCommand) error {
return m.ErrDashboardVersionMismatch
}
}
// do not allow plugin dashboard updates without overwrite flag
if existing.PluginId != "" && cmd.Overwrite == false {
return m.UpdatePluginDashboardError{PluginId: existing.PluginId}
}
}
sameTitleExists, err := sess.Where("org_id=? AND slug=?", dash.OrgId, dash.Slug).Get(&sameTitle)