ansible/awx

A non-admin user with 'admin' permission to an organization cannot modify it

开放

#15,950 创建于 2025年4月18日

 (4 条评论) (0 个反应) (0 位负责人)Python (3,333 个派生)batch import
communitycomponent:awx_collectioncomponent:collectionhelp wantedneeds_triagetype:bug

仓库指标

星标
 (13,071 个星标)
PR 合并指标
 (平均合并 24天 6小时) (30 天内合并 30 个 PR)

描述

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • I understand that AWX is open source software provided for free and that I might not receive a timely response.
  • I am NOT reporting a (potential) security vulnerability. (These should be emailed to security@ansible.com instead.)

Bug Summary

  • when an organization is created using awx.awx.organization and the non-admin user is given admin permissions to it using awx.awx.role, that user cannot modify it from the GUI.
  • when an organization is created using the GUI by the admin and the non-admin user is given admin permissions to it using the same UI by the same admin, the user can modify it from the GUI.

AWX version

24.6.2.dev0+g94e5795dfc.d20241202

Select the relevant components

  • UI
  • UI (tech preview)
  • API
  • Docs
  • Collection
  • CLI
  • Other

Installation method

docker development environment

Modifications

no

Ansible version

2.18.4

Operating system

Ubuntu 24.04 noble

Web browser

Chrome

Steps to reproduce

- name: Creating the customer's 'my Organization'
  awx.awx.organization:
        controller_host: "{{ ansible_host_fqdn }}"
        controller_oauthtoken: "{{ awx_token }}"
        default_environment: "{{ default_environment }}"
        description: 'My Organization'
        galaxy_credentials: "{{ galaxy_credentials }}"
        name: "my Organization"
        state: 'present'
        validate_certs: true

- name: Giving the customer admin permissions to 'my Organization'
  awx.awx.role:
        controller_host: "{{ ansible_host_fqdn }}"
        controller_oauthtoken: "{{ awx_token }}"
        organizations:
                - "my Organization"
        role: 'admin'
        state: 'present'
        users: 
                - "username"
        validate_certs: true

Expected results

The user 'username' should be able to edit the organization "my Organization".

Actual results

The error message You do not have permission to perform this action. appears when the user tries to change the organization name.

Additional information

No response

贡献者指南