Uploaded image for project: 'Red Hat Developer Hub Bugs'
  1. Red Hat Developer Hub Bugs
  2. RHDHBUGS-1702

API throwing error upon adding conditions for scaffolder-action resource-type

XMLWordPrintable

    • 3
    • False
    • Hide

      None

      Show
      None
    • False
    • Hide
      In earlier versions of the Red Hat Developer Hub, conditional policies for permissions with a policy action of 'use' would throw an error. The issue is now fixed and conditional policies are able to be defined with permission policy actions of 'use'.
      Show
      In earlier versions of the Red Hat Developer Hub, conditional policies for permissions with a policy action of 'use' would throw an error. The issue is now fixed and conditional policies are able to be defined with permission policy actions of 'use'.
    • Bug Fix
    • 2
    • RHDH Core Team 3256, RHDH Core Team 3257

      Description of problem:

      While trying to add conditions for scaffolder plugin's `scaffolder-action` resource-type, api throws following error:

      {
          "error": {
              "name": "Error",
              "message": "Unable to find permission to get permission name for resource type 'scaffolder-action' and action \"use\"",
              "stack": "Error: Unable to find permission to get permission name for resource type 'scaffolder-action' and action \"use\"\n    at PolicesServer.processConditionMapping (/Users/divgupta/code/janus-idp-backstage-plugins/plugins/rbac-backend/src/service/policies-rest-api.ts:960:15)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at <anonymous> (/Users/divgupta/code/janus-idp-backstage-plugins/plugins/rbac-backend/src/service/policies-rest-api.ts:647:33)"
          },
          "request": {
              "method": "POST",
              "url": "/api/permission/roles/conditions"
          },
          "response": {
              "statusCode": 500
          }
      } 

      Payload:

      {"result":"CONDITIONAL","roleEntityRef":"role:default/dev","pluginId":"scaffolder","resourceType":"scaffolder-action","permissionMapping":["use"],"conditions":{"rule":"HAS_ACTION_ID","resourceType":"scaffolder-action","params":{"actionId":"temp"}}} 

              rh-ee-pknight Patrick Knight
              divgupta Divyanshi Gupta
              RHIDP - Plugins
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: