redhat-cop / aap_configuration_extended

providing extended functionality that is not in aap_configuration
GNU General Public License v3.0
0 stars 3 forks source link

feature - support of exporting access lists #1

Open przemkalit opened 1 week ago

przemkalit commented 1 week ago

What does this PR do?

This PR introduce a feature that I was working recently, which is exporting permission of objects using access list endpoint of API.

I don't know if you would like to allow this in the collection but I decided to share this feature, but let me know what do you think.

How should this be tested?

- name: Permission export
  hosts: localhost
  connection: local
  gather_facts: false

  tasks:
    - name: Export team permissions of an object
      ansible.builtin.include_role:
        name: filetree_create
        tasks_from: team_access_list
      vars:
        object_id: 1
        object_type: "job_templates"

    - name: Export user permissions of an object
      ansible.builtin.include_role:
        name: filetree_create
        tasks_from: user_access_list
      vars:
        object_id: 1
        object_type: "job_templates"

Is there a relevant Issue open for this?

N/A

Other Relevant info, PRs, etc

N/A

przemkalit commented 3 days ago

Ok I've added support for an object_name.