Skip to content

Commit

Permalink
Add ConfigurationScriptSource to RBAC
Browse files Browse the repository at this point in the history
  • Loading branch information
lpichler committed Mar 6, 2018
1 parent e55ac98 commit 671929e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/rbac/filterer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class Filterer
CloudVolume
ConfigurationProfile
ConfigurationScriptBase
ConfigurationScriptSource
ConfiguredSystem
Container
ContainerBuild
Expand Down
11 changes: 11 additions & 0 deletions spec/lib/rbac/filterer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,17 @@ def combine_filtered_ids(user_filtered_ids, belongsto_filtered_ids, managed_filt
tagged_group.save!
end

context 'searching for instances of ConfigurationScriptSource' do
let!(:configuration_script_source) { FactoryGirl.create_list(:embedded_ansible_configuration_script_source, 2).first }

it 'lists only tagged ConfigurationScriptSources' do
configuration_script_source.tag_with('/managed/environment/prod', :ns => '*')

results = described_class.search(:class => ManageIQ::Providers::EmbeddedAutomationManager::ConfigurationScriptSource, :user => user).first
expect(results).to match_array [configuration_script_source]
end
end

context 'searching for instances of AuthKeyPair' do
let!(:auth_key_pair_cloud) { FactoryGirl.create_list(:auth_key_pair_cloud, 2).first }

Expand Down

0 comments on commit 671929e

Please sign in to comment.