Revert "RBAC: remove dashboard ACL logic from dash store and service (#78130)"
This reverts commit dd54931147.
This commit is contained in:
@@ -1183,6 +1183,21 @@ func insertTestDashboardForPlugin(t *testing.T, dashboardStore dashboards.Store,
|
||||
return dash
|
||||
}
|
||||
|
||||
func updateDashboardACL(t *testing.T, dashboardStore dashboards.Store, dashboardID int64,
|
||||
items ...dashboards.DashboardACL) error {
|
||||
t.Helper()
|
||||
|
||||
var itemPtrs []*dashboards.DashboardACL
|
||||
for _, it := range items {
|
||||
item := it
|
||||
item.Created = time.Now()
|
||||
item.Updated = time.Now()
|
||||
itemPtrs = append(itemPtrs, &item)
|
||||
}
|
||||
|
||||
return dashboardStore.UpdateDashboardACL(context.Background(), dashboardID, itemPtrs)
|
||||
}
|
||||
|
||||
// testSearchDashboards is a (near) copy of the dashboard service
|
||||
// SearchDashboards, which is a wrapper around FindDashboards.
|
||||
func testSearchDashboards(d dashboards.Store, query *dashboards.FindPersistedDashboardsQuery) (model.HitList, error) {
|
||||
|
||||
Reference in New Issue
Block a user