-
Notifications
You must be signed in to change notification settings - Fork 29
"Merge" should also check user account (and use entity with an account as the primary, remaining entity) #3619
Copy link
Copy link
Labels
Status: Complex Issueadvanced, particularly challenging topic that requires extensive knowledge of the code baseadvanced, particularly challenging topic that requires extensive knowledge of the code basereleased on @mastermanaged by CI (semantic-release)managed by CI (semantic-release)
Description
Describe the bug
When merging two entities using the bulk action, it can happen that one of the entities has a Keycloak user account associated. It then depends on luck that the entity ID linked in the user account is also the one that remains in the database.
Instead, we should:
- check user accounts for both merging entities
- display them in the comparison screen
- by default, select that entity as the primary (whose _id remains in the DB), which has an account (if only one of the two has an account)
- warn the user that an account will be orphaned (continue to exist but not have a valid entity linked to it), when the merge is confirmed and an account is linked to the entity that gets deleted by the merge (e.g. because both entities had an account)
Scenarios:
- no user accounts linked
- no account merge UI visible
- one entity has account linked
- show account merge UI to make this explicit
- maybe auto-select the entity with the account to be the primary (not to be deleted), so that the account doesn't have to be updated
- ❓ allow to delete the user account during merge? --> not important now
- both entities have account linked
- show account merge UI
- ❓ show a confirmation dialog before actually changing the accounts?
- update account of the primary (not deleted) record upon save
- delete the account of the secondary (deleted after merge)
- entity type may have user accounts (
enableUserAccounts: true) but user has noaccount_managerpermissions- show a warning in merge UI about permissions and possible accounts that might get orphaned
- show confirmation before applying merge
- entity type may have user accounts (
enableUserAccounts: true) and API is not accessible (offline / errors / ...)- show warning in merge UI
- show confirmation before applying merge
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Status: Complex Issueadvanced, particularly challenging topic that requires extensive knowledge of the code baseadvanced, particularly challenging topic that requires extensive knowledge of the code basereleased on @mastermanaged by CI (semantic-release)managed by CI (semantic-release)
Type
Projects
Status
Done