* Reuse DasbhoardPermissionFilter
* Use rbac dashboard filter if enabled
(cherry picked from commit aa484a60c9)
This commit is contained in:
@@ -141,7 +141,7 @@ func TestIntegrationAlertingDataAccess(t *testing.T) {
|
||||
|
||||
t.Run("Viewer can read alerts", func(t *testing.T) {
|
||||
setup(t)
|
||||
viewerUser := &models.SignedInUser{OrgRole: models.ROLE_VIEWER, OrgId: 1}
|
||||
viewerUser := &models.SignedInUser{OrgRole: models.ROLE_VIEWER, OrgId: 1, Permissions: map[int64]map[string][]string{1: {"dashboards:read": []string{"dashboards:*"}}}}
|
||||
alertQuery := models.GetAlertsQuery{DashboardIDs: []int64{testDash.Id}, PanelId: 1, OrgId: 1, User: viewerUser}
|
||||
err2 := sqlStore.HandleAlertsQuery(context.Background(), &alertQuery)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user