Uploaded image for project: 'mod-permissions'
  1. mod-permissions
  2. MODPERMS-164

Cannot add permissions to permission user

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: TBD
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Template:
    • Sprint:
      CP: sprint 127
    • Story Points:
      0.5
    • Development Team:
      Core: Platform

      Description

      Overview: Error occurs when karate tests run against folio-testing. While getting permission for data-export.all and invoice.all * we get * and error message:

      "Unable to update derived fields: Attempting to add non-existent permissions data-export.all,invoice.all to permission user with id 60b32b9f-a9a5-457f-b083-d83c64873e60"

      08:43:07 [] [] [] [] INFO  CQLWrapper           CRITERION >>> SQL: WHERE (jsonb->>'permissionName') = 'data-export.all'    >>>WHERE (jsonb->>'permissionName') = 'data-export.all'
      08:43:07 [] [] [] [] INFO  CQLWrapper           CRITERION >>> SQL: WHERE (jsonb->>'permissionName') = 'invoice.all'    >>>WHERE (jsonb->>'permissionName') = 'invoice.all'
      08:43:07 [] [] [] [] ERROR PermsAPI             Error updating derived fields: Attempting to add non-existent permissions data-export.all,invoice.all to permission user with id 60b32b9f-a9a5-457f-b083-d83c64873e60org.folio.rest.impl.PermsAPI$InvalidPermissionsException: Attempting to add non-existent permissions data-export.all,invoice.all to permission user with id 60b32b9f-a9a5-457f-b083-d83c64873e60 at org.folio.rest.impl.PermsAPI.lambda$72(PermsAPI.java:1079) ~[mod-permissions-fat.jar:?]

      Steps to reproduce:

      • Import attached Postman collection
      • Run "folio-testing login" with testing_admin credentials (already filled fields) request to get token (x-okapi-token header will be automatically filled).
      • Run "POST permission to user" request 
        Request body already filled with userId and permissions:
      { "userId":"00000000-1111-5555-9999-999999999992", "permissions": ["data-export.all", "invoice.all"] }

        * After request has been sent, there will be an error in the response body:

      { "errors": [ { "message": "Unable to update derived fields: Attempting to add non-existent permissions data-export.all,invoice.all to permission user with id dbcc50a2-e6b0-416c-a1c6-48b6c78cd7c9", "type": "1", "code": "-1", "parameters": [ { "key": "id", "value": "dbcc50a2-e6b0-416c-a1c6-48b6c78cd7c9" } ] } ] }

       

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                adam Adam Dickmeiss
                Reporter:
                Aivar Iusupov Aivar Iusupov
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases