From PR https://github.com/ManageIQ/manageiq/pull/12294: This PR exposes a user's groups to the Automate engine, addressing a use case presented on ManageIQ Talk: http://talk.manageiq.org/t/how-to-get-multi-groups-of-a-user-in-automation/1799 Steps for Testing/QA Display a user's groups in an Automate method: groups = $evm.vmdb(:user).first.miq_groups $evm.log(:info, "Displaying the user's groups: #{groups.inspect}")
Verified in 5.8.0.3 <AEMethod [/qqq/System/Request/mytest]> Starting <AEMethod mytest> Displaying the user's groups: [#<MiqAeServiceMiqGroup:0x107f2f0 @object=#<MiqGroup id: 2, description: "EvmGroup-super_administrator", group_type: "system", sequence: 1, created_on: "2017-03-03 03:20:03", updated_on: "2017-03-03 03:20:03", settings: nil, tenant_id: 1>, @virtual_columns=["allocated_memory", "allocated_storage", "allocated_vcpu", "custom_1", "custom_2", "custom_3", "custom_4", "custom_5", "custom_6", "custom_7", "custom_8", "custom_9", "miq_user_role_name", "provisioned_storage", "read_only", "region_description", "region_number", "user_count"], @associations=["tenant", "users", "vms"]>] <AEMethod [/qqq/System/Request/mytest]> Ending