ansible / awx

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
Other
14.05k stars 3.42k forks source link

awx cli cannot modify projects with the user of type Normal User that has required permissions on project. #15288

Open snehald12 opened 4 months ago

snehald12 commented 4 months ago

Please confirm the following

Bug Summary

With API patch request the project gets modified with normal user that has admin permission on project but when we use the AWX cli to modify projects using normal user with all permission set on project i.e admin, use, read, update it fails.

AWX version

4.5.1

Select the relevant components

Installation method

N/A

Modifications

no

Ansible version

No response

Operating system

No response

Web browser

No response

Steps to reproduce

The controller cli is on "4.4.7" version and results are same using awxkit "24.4.0" it exists with error message:

Steps to reproduce:

# awx --conf.host https://controller_url/ --conf.username <normal_username> --conf.password xxx projects modify ID --scm_branch=1.0.45 -k -s -vvv

awx: unrecognized arguments: --scm_branch=1.0.45 -k -s -vvv
usage: awx projects modify [-h] id

positional arguments:
id the ID (or unique name) of the resource

optional arguments:
-h, --help show this help message and exit

Expected results

Customer would like to modify the resources on the controller using normal users in same way they were able to modify the controller resources using admin user.

Actual results

Awx cli command run fails to modify project with Normal User that has an admin role assigned on the project.

Additional information

No response

tiagodcc commented 3 months ago

Hi @snehald12 +1 The issue you are describing has been present for a long time now. As a solution approach, you can add "Project Admin" permissions for the user on the organization level. I know that this isn't a proper solution. However, the user isn't a system administrator.