diff --git a/bundle/permissions/mutator.go b/bundle/permissions/mutator.go index bb6a657bf..c4b970857 100644 --- a/bundle/permissions/mutator.go +++ b/bundle/permissions/mutator.go @@ -17,7 +17,7 @@ const CAN_MANAGE = "CAN_MANAGE" const CAN_VIEW = "CAN_VIEW" const CAN_RUN = "CAN_RUN" -var notSupportedResources = []string{"clusters", "volumes", "schemas", "quality_monitors", "registered_models"} +var unsupportedResources = []string{"clusters", "volumes", "schemas", "quality_monitors", "registered_models"} var allowedLevels = []string{CAN_MANAGE, CAN_VIEW, CAN_RUN} var levelsMap = map[string](map[string]string){ diff --git a/bundle/permissions/mutator_test.go b/bundle/permissions/mutator_test.go index 0c3f87e05..78703e90f 100644 --- a/bundle/permissions/mutator_test.go +++ b/bundle/permissions/mutator_test.go @@ -162,15 +162,15 @@ func TestWarningOnOverlapPermission(t *testing.T) { func TestAllResourcesExplicitlyDefinedForPermissionsSupport(t *testing.T) { r := config.Resources{} - for _, resource := range notSupportedResources { + for _, resource := range unsupportedResources { _, ok := levelsMap[resource] - assert.False(t, ok, fmt.Sprintf("Resource %s is defined in both levelsMap and notSupportedResources", resource)) + assert.False(t, ok, fmt.Sprintf("Resource %s is defined in both levelsMap and unsupportedResources", resource)) } for _, resource := range r.AllResources() { _, ok := levelsMap[resource.Description.PluralName] - if !slices.Contains(notSupportedResources, resource.Description.PluralName) && !ok { - assert.Fail(t, fmt.Sprintf("Resource %s is not explicitly defined in levelsMap or notSupportedResources", resource.Description.PluralName)) + if !slices.Contains(unsupportedResources, resource.Description.PluralName) && !ok { + assert.Fail(t, fmt.Sprintf("Resource %s is not explicitly defined in levelsMap or unsupportedResources", resource.Description.PluralName)) } } }