mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
@@ -75,6 +75,8 @@ func NewAccessControlDashboardPermissionFilter(user identity.Requester, permissi
|
||||
accesscontrol.ActionAlertingRuleCreate,
|
||||
)
|
||||
}
|
||||
} else if queryType == searchstore.TypeAnnotation {
|
||||
dashboardActions = append(dashboardActions, accesscontrol.ActionAnnotationsRead)
|
||||
} else {
|
||||
folderActions = append(folderActions, dashboards.ActionFoldersRead)
|
||||
dashboardActions = append(dashboardActions, dashboards.ActionDashboardsRead)
|
||||
|
||||
@@ -13,6 +13,7 @@ const (
|
||||
TypeFolder = "dash-folder"
|
||||
TypeDashboard = "dash-db"
|
||||
TypeAlertFolder = "dash-folder-alerting"
|
||||
TypeAnnotation = "dash-annotation"
|
||||
)
|
||||
|
||||
type TypeFilter struct {
|
||||
|
||||
Reference in New Issue
Block a user