Cfg: Move ViewersCanEdit into cfg (#64876)

move ViewersCanEdit into cfg
This commit is contained in:
Jo
2023-03-16 09:54:01 +00:00
committed by GitHub
parent 7fd7c6ed78
commit 6b6cf5f4b7
21 changed files with 94 additions and 94 deletions

View File

@@ -392,7 +392,7 @@ func validateAndUnMarshalArrayResponse(t *testing.T, resp response.Response) lib
func scenarioWithPanel(t *testing.T, desc string, fn func(t *testing.T, sc scenarioContext)) {
t.Helper()
store := dbtest.NewFakeDB()
guardian.InitLegacyGuardian(store, &dashboards.FakeDashboardService{}, &teamtest.FakeService{})
guardian.InitLegacyGuardian(setting.NewCfg(), store, &dashboards.FakeDashboardService{}, &teamtest.FakeService{})
testScenario(t, desc, func(t *testing.T, sc scenarioContext) {
command := getCreatePanelCommand(sc.folder.ID, "Text - Library Panel")
@@ -446,7 +446,7 @@ func testScenario(t *testing.T, desc string, fn func(t *testing.T, sc scenarioCo
features, folderPermissions, dashboardPermissions, ac,
foldertest.NewFakeService(),
)
guardian.InitLegacyGuardian(sqlStore, dashboardService, &teamtest.FakeService{})
guardian.InitLegacyGuardian(sqlStore.Cfg, sqlStore, dashboardService, &teamtest.FakeService{})
service := LibraryElementService{
Cfg: sqlStore.Cfg,
SQLStore: sqlStore,