Allow saving of provisioned dashboards (#19820)
Allows saving of provisioned dashboards if the config value allowUiUpdates is set to true Fixes #11778
This commit is contained in:
@@ -964,13 +964,13 @@ func permissionScenario(desc string, canSave bool, fn dashboardPermissionScenari
|
||||
|
||||
func callSaveWithResult(cmd models.SaveDashboardCommand) *models.Dashboard {
|
||||
dto := toSaveDashboardDto(cmd)
|
||||
res, _ := dashboards.NewService().SaveDashboard(&dto)
|
||||
res, _ := dashboards.NewService().SaveDashboard(&dto, false)
|
||||
return res
|
||||
}
|
||||
|
||||
func callSaveWithError(cmd models.SaveDashboardCommand) error {
|
||||
dto := toSaveDashboardDto(cmd)
|
||||
_, err := dashboards.NewService().SaveDashboard(&dto)
|
||||
_, err := dashboards.NewService().SaveDashboard(&dto, false)
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -994,7 +994,7 @@ func saveTestDashboard(title string, orgId int64, folderId int64) *models.Dashbo
|
||||
},
|
||||
}
|
||||
|
||||
res, err := dashboards.NewService().SaveDashboard(&dto)
|
||||
res, err := dashboards.NewService().SaveDashboard(&dto, false)
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
return res
|
||||
@@ -1020,7 +1020,7 @@ func saveTestFolder(title string, orgId int64) *models.Dashboard {
|
||||
},
|
||||
}
|
||||
|
||||
res, err := dashboards.NewService().SaveDashboard(&dto)
|
||||
res, err := dashboards.NewService().SaveDashboard(&dto, false)
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user