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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user