RBAC: Remove dashboard guardians pt 3 (#102558)
* remove usage of New dashboard guardian * fix tests
This commit is contained in:
@@ -768,3 +768,12 @@ func TestSetDefaultPermissionsWhenCreatingFolder(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func setUpRBACGuardian(t *testing.T) {
|
||||
origNewGuardian := guardian.New
|
||||
t.Cleanup(func() {
|
||||
guardian.New = origNewGuardian
|
||||
})
|
||||
|
||||
guardian.MockDashboardGuardian(&guardian.FakeDashboardGuardian{CanEditValue: true, CanViewValue: true})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user