mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 11:12:58 +08:00
WIP: adds API check to stop folders being included in folders
This commit is contained in:
@ -194,6 +194,10 @@ func PostDashboard(c *middleware.Context, cmd m.SaveDashboardCommand) Response {
|
||||
return ApiError(403, "Does not have permission to save this dashboard", nil)
|
||||
}
|
||||
|
||||
if dash.IsFolder && dash.ParentId > 0 {
|
||||
return ApiError(400, m.ErrDashboardFolderCannotHaveParent.Error(), nil)
|
||||
}
|
||||
|
||||
// Check if Title is empty
|
||||
if dash.Title == "" {
|
||||
return ApiError(400, m.ErrDashboardTitleEmpty.Error(), nil)
|
||||
|
Reference in New Issue
Block a user