Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-9074

I cannot recreate a user with previously selected tenant

    XMLWordPrintable

Details

    • Bug Report
    • Resolution: Fixed
    • L3 - Default
    • 7.9.0, 7.8.7, 7.9.0-alpha5
    • 7.8.0, 7.9.0
    • engine
    • None

    Description

      Steps to reproduce:

      • Create two new tenants - "tenant1" & "tenant2"
      • Create a new user - "wert"
      • Add user to a tenant "tenant1"
      • Select the created user
      • Select the account
      • Delete the user
      • Add a new user (with the same data) - "wert"
      • Add this user to the same tenant "tenant1"

      Current behavior:
      An exceptions is thrown:

      10:24:19,585 ERROR [org.camunda.bpm.engine.context] (default task-2) ENGINE-16004 Exception while closing command context: ENGINE-03083 Exception while executing Batch Database Operations with message '
      ### Error flushing statements.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.AuthorizationEntity.insertAuthorization (batch index #1) failed. Cause: org.h2.jdbc.JdbcBatchUpdateException: Unique index or primary key violation: "ACT_UNIQ_AUTH_USER_INDEX_6 ON PUBLIC.ACT_RU_AUTHORIZATION(TYPE_, USER_ID_, RESOURCE_TYPE_, RESOURCE_ID_) VALUES (1, 'wert', 11, 'tenant2', 67)"; SQL statement:
      insert into ACT_RU_AUTHORIZATION (
            ID_,
            TYPE_,
            GROUP_ID_,
            USER_ID_,
            RESOURCE_TYPE_,
            RESOURCE_ID_,
            PERMS_,
            REV_
            )
          values (
            ?,
            ?,
            ?,
            ?,
            ?,
            ?,
            ?,
            1
          ) [23505-190]
      ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.AuthorizationEntity.insertAuthorization (batch index #1) failed. Cause: org.h2.jdbc.JdbcBatchUpdateException: Unique index or primary key violation: "ACT_UNIQ_AUTH_USER_INDEX_6 ON PUBLIC.ACT_RU_AUTHORIZATION(TYPE_, USER_ID_, RESOURCE_TYPE_, RESOURCE_ID_) VALUES (1, 'wert', 11, 'tenant2', 67)"; SQL statement:
      insert into ACT_RU_AUTHORIZATION (
            ID_,
            TYPE_,
            GROUP_ID_,
            USER_ID_,
            RESOURCE_TYPE_,
            RESOURCE_ID_,
            PERMS_,
            REV_
            )
          values (
            ?,
            ?,
            ?,
            ?,
            ?,
            ?,
            ?,
            1
          ) [23505-190]
      

      Go to Admin -> Authorizations -> Tenant:
      the tenant authorization for "wert" with resource ID "tenant1" is still there.

      Expected behavior:
      When deleting a user the tenant authorization is deleted.
      (And after re-creation of the user, it is possible to add the same tenant.)

      Hint:
      Please check DbIdentityServiceProvider#deleteUser().

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Activity

            People

              Unassigned Unassigned
              yana.vasileva Yana Vasileva
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Salesforce