Chore: Remove dashboard ACL from models (#61749)

* Remove dashboard ACL from models

* Remove unused comment
This commit is contained in:
idafurjes
2023-01-20 14:58:47 +01:00
committed by GitHub
parent c106c7700b
commit 68445a7c77
34 changed files with 452 additions and 451 deletions

View File

@@ -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)