mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Remove dashboard ACL from models (#61749)
* Remove dashboard ACL from models * Remove unused comment
This commit is contained in:
@@ -541,7 +541,7 @@ var (
|
||||
)
|
||||
|
||||
type setUpConf struct {
|
||||
aclMockResp []*models.DashboardACLInfoDTO
|
||||
aclMockResp []*dashboards.DashboardACLInfoDTO
|
||||
}
|
||||
|
||||
type mockSearchService struct{ ExpectedResult models.HitList }
|
||||
@@ -556,7 +556,7 @@ func setUp(confs ...setUpConf) *HTTPServer {
|
||||
store := dbtest.NewFakeDB()
|
||||
hs := &HTTPServer{SQLStore: store, SearchService: &mockSearchService{}}
|
||||
|
||||
aclMockResp := []*models.DashboardACLInfoDTO{}
|
||||
aclMockResp := []*dashboards.DashboardACLInfoDTO{}
|
||||
for _, c := range confs {
|
||||
if c.aclMockResp != nil {
|
||||
aclMockResp = c.aclMockResp
|
||||
@@ -564,8 +564,8 @@ func setUp(confs ...setUpConf) *HTTPServer {
|
||||
}
|
||||
teamSvc := &teamtest.FakeService{}
|
||||
dashSvc := &dashboards.FakeDashboardService{}
|
||||
dashSvc.On("GetDashboardACLInfoList", mock.Anything, mock.AnythingOfType("*models.GetDashboardACLInfoListQuery")).Run(func(args mock.Arguments) {
|
||||
q := args.Get(1).(*models.GetDashboardACLInfoListQuery)
|
||||
dashSvc.On("GetDashboardACLInfoList", mock.Anything, mock.AnythingOfType("*dashboards.GetDashboardACLInfoListQuery")).Run(func(args mock.Arguments) {
|
||||
q := args.Get(1).(*dashboards.GetDashboardACLInfoListQuery)
|
||||
q.Result = aclMockResp
|
||||
}).Return(nil)
|
||||
guardian.InitLegacyGuardian(store, dashSvc, teamSvc)
|
||||
|
||||
Reference in New Issue
Block a user