Annotations: Update annotation scope resolver to resolve annotation scopes to dash and folder scopes (#78222)

* update annotation scope resolver to resolve dashboard annotation scopes to dash and folder scopes

* Update annotations.go

remove unwanted changes

* remove unwanted change

* use switch statement
This commit is contained in:
Ieva
2023-11-17 11:57:25 +02:00
committed by GitHub
parent 36fd9040af
commit 2a5547e1b5
3 changed files with 111 additions and 25 deletions
+1 -1
View File
@@ -358,7 +358,7 @@ func ProvideHTTPServer(opts ServerOptions, cfg *setting.Cfg, routeRegister routi
hs.registerRoutes()
// Register access control scope resolver for annotations
hs.AccessControl.RegisterScopeAttributeResolver(AnnotationTypeScopeResolver(hs.annotationsRepo))
hs.AccessControl.RegisterScopeAttributeResolver(AnnotationTypeScopeResolver(hs.annotationsRepo, features, dashboardService, folderService))
if err := hs.declareFixedRoles(); err != nil {
return nil, err