permission: fix user with org viewer save/move permissions

User with org viewer role should not be able to save/move dashboards
in/to general folder.
This commit is contained in:
Marcus Efraimsson
2018-04-11 00:23:50 +02:00
parent 93e1546f73
commit b4863002c9
6 changed files with 191 additions and 34 deletions
+5
View File
@@ -224,6 +224,10 @@ func GetFolderUrl(folderUid string, slug string) string {
return fmt.Sprintf("%s/dashboards/f/%s/%s", setting.AppSubUrl, folderUid, slug)
}
type ValidateDashboardBeforeSaveResult struct {
IsParentFolderChanged bool
}
//
// COMMANDS
//
@@ -268,6 +272,7 @@ type ValidateDashboardBeforeSaveCommand struct {
OrgId int64
Dashboard *Dashboard
Overwrite bool
Result *ValidateDashboardBeforeSaveResult
}
//