Skip to content

Commit

Permalink
API for vm_infras in reconfigure form from manageiq-API(changed the t…
Browse files Browse the repository at this point in the history
…argets according to the condition in rbac filer)
  • Loading branch information
jaisejose1123 committed Apr 10, 2024
1 parent 3677b16 commit 6fbab91
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/rbac/filterer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,14 @@ def search(options = {})
end
end

if scope.present?
targets = scope if targets[0][:objectIds].blank?
unless targets.count == 1
targets = scope
else
if targets[0].is_a?(Hash)
targets = scope if targets[0][:objectIds].blank?
else
targets = scope if targets.all? { |element| Integer === element }
end
end

unless options[:skip_counts]
Expand Down

0 comments on commit 6fbab91

Please sign in to comment.