Uploaded image for project: 'Automation Hub'
  1. Automation Hub
  2. AAH-2327

As a superuser I cannot modify a container-push repository via API

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • 2.3, 2.4
    • 2.2, 2.3, 2.4
    • Backend, Pulp
    • None
    • Important

      Description

      As a superuser I cannot modify a container-push repository via API

      This API works on a pulp-only system.

      Key Dependency Versions

      {
        "available_versions":

      {     "v3": "v3/"   }

      ,
        "server_version": "4.4.4",
        "galaxy_ng_version": "4.4.4",
        "galaxy_importer_version": "0.4.0",
        "pulp_core_version": "3.15.9",
        "pulp_ansible_version": "0.10.2",
        "pulp_container_version": "2.8.6"
      }

      Steps to Reproduce

      ❯ curl -kX 'PATCH' \
        'https://FQDN/pulp/api/v3/repositories/container/container-push/6e2fd4fb-cc04-43e6-84c5-6880cbdbea52'/ \
        -H 'accept: application/json' \                     
        -H 'Authorization: Basic BASE64CREDS' \
        -H 'Content-Type: application/json' \
        -d '{
        "retain_repo_versions": 1
      }'
       

      Actual Behavior

      403

      {"detail":"You do not have permission to perform this action."}

      Expected Behavior

      200

      {"task": "id"}

       

      The superuser must have permissions for the change

       

      NOTES:

      Root Cause:

      https://github.com/ansible/galaxy_ng/blob/master/galaxy_ng/app/access_control/statements/pulp.py#L177 the specification is missing permissions for update and partial_update

       

      Solution

      Include the statements from https://github.com/pulp/pulp_container/blob/main/pulp_container/app/viewsets.py#L971 on galaxy_ng statements

              rochacbruno@redhat.com Bruno Rocha
              rochacbruno@redhat.com Bruno Rocha
              Devendra Singh, Ina Panova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: