diff --git a/lib/rbac/filterer.rb b/lib/rbac/filterer.rb index e17dd9fd9c3..bce700d8f96 100644 --- a/lib/rbac/filterer.rb +++ b/lib/rbac/filterer.rb @@ -414,7 +414,7 @@ def apply_rbac_directly?(klass) # the associated application model. See #rbac_class method # def apply_rbac_through_association?(klass) - klass != VimPerformanceDaily && (klass < MetricRollup || klass < Metric) + klass != VimPerformanceDaily && klass != VimPerformanceTag && (klass < MetricRollup || klass < Metric) end def rbac_base_class(klass) diff --git a/spec/lib/rbac/filterer_spec.rb b/spec/lib/rbac/filterer_spec.rb index e65670a4b93..128e4e35c05 100644 --- a/spec/lib/rbac/filterer_spec.rb +++ b/spec/lib/rbac/filterer_spec.rb @@ -2622,6 +2622,7 @@ def get_rbac_results_for_and_expect_objects(klass, expected_objects) it ".apply_rbac_through_association?" do expect(described_class.new.send(:apply_rbac_through_association?, HostMetric)).to be_truthy expect(described_class.new.send(:apply_rbac_through_association?, Vm)).not_to be + expect(described_class.new.send(:apply_rbac_through_association?, VimPerformanceTag)).not_to be end describe "find_targets_with_direct_rbac" do