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

I cannot recreate a user with previously selected tenant

    Details

    • Type: Bug Report
    • Status: Closed
    • Priority: L3 - Default
    • Resolution: Fixed
    • Affects Version/s: 7.8.0, 7.9.0
    • Fix Version/s: 7.9.0, 7.8.7, 7.9.0-alpha5
    • Component/s: engine
    • Labels:
      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().

        Activity

        Show
        yana.vasileva Yana Vasileva added a comment - Related to https://forum.camunda.org/t/delete-user-doesnt-delete-user-tenant/7124

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development