RBAC: Change annotation filter to use dashboard based annotation scopes (#78635)

change annotation filter to use dash based annotation scopes
This commit is contained in:
Ieva
2023-11-29 05:34:44 -05:00
committed by GitHub
parent ff7dd17c56
commit 791881f910
7 changed files with 130 additions and 66 deletions
@@ -4,8 +4,10 @@ package accesscontrol
type AccessResources struct {
// Dashboards is a map of dashboard UIDs to IDs
Dashboards map[string]int64
// ScopeTypes contains the scope types that the user has access to. At most `dashboard` and `organization`
ScopeTypes map[any]struct{}
// CanAccessDashAnnotations true if the user is allowed to access some dashboard annotations
CanAccessDashAnnotations bool
// CanAccessOrgAnnotations true if the user is allowed to access organization annotations
CanAccessOrgAnnotations bool
}
type dashboardProjection struct {