From a77d4f24523fec7b117ebcb98a6ae40150a1e929 Mon Sep 17 00:00:00 2001 From: Kamil Czaja Date: Mon, 9 Dec 2024 16:00:06 +0100 Subject: [PATCH] fix: user deletion --- .../web/pages/usermanagement/UserDeletionApiService.kt | 5 +++-- .../sovity/authorityportal/web/services/ConnectorService.kt | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/web/pages/usermanagement/UserDeletionApiService.kt b/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/web/pages/usermanagement/UserDeletionApiService.kt index 016e36f21..31f60feef 100644 --- a/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/web/pages/usermanagement/UserDeletionApiService.kt +++ b/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/web/pages/usermanagement/UserDeletionApiService.kt @@ -102,11 +102,12 @@ class UserDeletionApiService( userService.deleteInvitationReferencesToOrgMembers(orgMemberIds) userService.deleteOrganizationIds(orgMemberIds) - keycloakService.deleteOrganization(organizationId) organizationService.deleteOrganization(organizationId) - keycloakService.deleteUsers(orgMemberIds) userService.deleteUsers(orgMemberIds) + keycloakService.deleteUsers(orgMemberIds) + keycloakService.deleteOrganization(organizationId) + Log.info( "Organization and related users, connectors and central components deleted. " + "organization=${organizationId}, adminUserId=$adminUserId." diff --git a/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/web/services/ConnectorService.kt b/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/web/services/ConnectorService.kt index 81379d607..5cf9e7653 100644 --- a/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/web/services/ConnectorService.kt +++ b/authority-portal-backend/authority-portal-quarkus/src/main/kotlin/de/sovity/authorityportal/web/services/ConnectorService.kt @@ -106,6 +106,7 @@ class ConnectorService( val c = Tables.CONNECTOR dsl.update(c) .setNull(c.PROVIDER_ORGANIZATION_ID) + .setNull(c.CREATED_BY) .where(c.PROVIDER_ORGANIZATION_ID.eq(organizationId)) .execute() }