From 07f2e7137fcfa6c1a9928637da3a4fe470817b71 Mon Sep 17 00:00:00 2001 From: Muhsin Shah C P Date: Mon, 14 Apr 2025 18:49:22 +0530 Subject: [PATCH] Fixed: archiving user from personal workspace on all users page (#12578) --- frontend/ee | 2 +- server/ee | 2 +- server/src/modules/organization-users/controller.ts | 4 ++-- .../src/modules/organization-users/interfaces/IController.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/ee b/frontend/ee index 0483976124..1e9ecf7ea6 160000 --- a/frontend/ee +++ b/frontend/ee @@ -1 +1 @@ -Subproject commit 04839761243719f881c4a9ebbb052fc09ab6b967 +Subproject commit 1e9ecf7ea675a48622726c79e3382258701e3c14 diff --git a/server/ee b/server/ee index 2944154e1f..1d1c2c05b1 160000 --- a/server/ee +++ b/server/ee @@ -1 +1 @@ -Subproject commit 2944154e1f74f87c0389e4b17287b36cc3616dbe +Subproject commit 1d1c2c05b112e12f01a219567973a70ddf2935cb diff --git a/server/src/modules/organization-users/controller.ts b/server/src/modules/organization-users/controller.ts index b9f6ff434d..d7116a5f04 100644 --- a/server/src/modules/organization-users/controller.ts +++ b/server/src/modules/organization-users/controller.ts @@ -78,8 +78,8 @@ export class OrganizationUsersController implements IOrganizationUsersController @InitFeature(FEATURE_KEY.USER_ARCHIVE) @Post(':id/archive') - async archive(@User() user: UserEntity, @Param('id') id: string) { - const organizationId = user.organizationId; + async archive(@User() user: UserEntity, @Param('id') id: string, @Body() body) { + const organizationId = body.organizationId ? body.organizationId : user.organizationId; await this.organizationUsersService.archive(id, organizationId, user); return; } diff --git a/server/src/modules/organization-users/interfaces/IController.ts b/server/src/modules/organization-users/interfaces/IController.ts index 92d1f995f9..9256607db4 100644 --- a/server/src/modules/organization-users/interfaces/IController.ts +++ b/server/src/modules/organization-users/interfaces/IController.ts @@ -7,7 +7,7 @@ export interface IOrganizationUsersController { getUserSuggestions(user: User, searchInput: string): Promise; create(user: User, inviteNewUserDto: InviteNewUserDto): Promise; bulkUploadUsers(user: User, file: any, res: Response): Promise; - archive(user: User, id: string): Promise; + archive(user: User, id: string, body: any): Promise; archiveAll(user: User, userId: string): Promise; unarchiveAll(user: User, userId: string): Promise; updateUser(id: string, updateUserDto: UpdateOrgUserDto, user: User): Promise;