Access control: FGAC for annotation updates (#46462)
* proposal * PR feedback * fix canSave bug * update scope naming * linting * linting Co-authored-by: Ezequiel Victorero <ezequiel.victorero@grafana.com>
This commit is contained in:
co-authored by
Ezequiel Victorero
parent
6eecd021a4
commit
f2450575b3
@@ -145,3 +145,17 @@ type ItemDTO struct {
|
||||
AvatarUrl string `json:"avatarUrl"`
|
||||
Data *simplejson.Json `json:"data"`
|
||||
}
|
||||
|
||||
type annotationType int
|
||||
|
||||
const (
|
||||
Global annotationType = iota
|
||||
Local
|
||||
)
|
||||
|
||||
func (annotation *ItemDTO) GetType() annotationType {
|
||||
if annotation.DashboardId != 0 {
|
||||
return Local
|
||||
}
|
||||
return Global
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user