Chore: Deprecate ID from Folder (#78281)

* Chore: Deprecate ID from Folder

* chore: add more linter comments

* chore: add missing lint comment
This commit is contained in:
Kat Yang
2023-11-20 15:44:51 -05:00
committed by GitHub
parent ae164df698
commit 2f2ce3edbb
34 changed files with 128 additions and 20 deletions
@@ -1019,6 +1019,7 @@ func setupAccessControlGuardianTest(
folderSvc := foldertest.NewFakeService()
folderStore := foldertest.NewFakeFolderStore(t)
// nolint:staticcheck
folderStore.On("GetFolderByID", mock.Anything, mock.Anything, mock.Anything).Maybe().Return(&folder.Folder{ID: folderID, UID: folderUID, OrgID: orgID}, nil)
ac.RegisterScopeAttributeResolver(dashboards.NewDashboardUIDScopeResolver(folderStore, fakeDashboardService, folderSvc))
+1
View File
@@ -112,6 +112,7 @@ func MockDashboardGuardian(mock *FakeDashboardGuardian) {
NewByFolder = func(_ context.Context, f *folder.Folder, orgId int64, user identity.Requester) (DashboardGuardian, error) {
mock.OrgID = orgId
mock.DashUID = f.UID
// nolint:staticcheck
mock.DashID = f.ID
mock.User = user
return mock, nil