Adding FGAC annotations validation for creation and deletion (#46736)

Access Control: Adding FGAC annotations validation for creation and deletion
Co-authored-by: IevaVasiljeva <ieva.vasiljeva@grafana.com>
This commit is contained in:
Ezequiel Victorero
2022-03-21 14:28:39 -03:00
committed by GitHub
parent 7ab1ef8d6e
commit c717320942
13 changed files with 377 additions and 111 deletions
+4 -4
View File
@@ -149,13 +149,13 @@ type ItemDTO struct {
type annotationType int
const (
Global annotationType = iota
Local
Organization annotationType = iota
Dashboard
)
func (annotation *ItemDTO) GetType() annotationType {
if annotation.DashboardId != 0 {
return Local
return Dashboard
}
return Global
return Organization
}