Skip to content

Commit f239420

Browse files
hemanandrclaude
andcommitted
fix: clarify user removal behavior in UI messaging
- Updated "Delete User" to "Remove User" to better reflect soft delete behavior - Changed dialog messaging to explain account is deactivated, not permanently deleted - Added comment in hook explaining soft delete implementation - Backend performs soft delete (sets IsActive=false) with additional safeguards - Preserves data for audit purposes while preventing login 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 7217da7 commit f239420

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

thingconnect.pulse.client/src/features/users/components/UserActions.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ export function UserActions({
204204
_dark={{ _hover: { bg: 'red.900', color: 'red.300' } }}
205205
>
206206
<Icon as={Trash2} boxSize={4} />
207-
Delete User
207+
Remove User
208208
</Menu.Item>
209209
</Menu.Content>
210210
</Menu.Positioner>
@@ -219,7 +219,7 @@ export function UserActions({
219219
<Dialog.Positioner>
220220
<DialogContent>
221221
<DialogHeader>
222-
<DialogTitle>Delete User</DialogTitle>
222+
<DialogTitle>Remove User</DialogTitle>
223223
</DialogHeader>
224224

225225
<VStack gap={4} py={4}>
@@ -231,8 +231,8 @@ export function UserActions({
231231
)}
232232

233233
<Text>
234-
Are you sure you want to delete the user <strong>{user.username}</strong>?
235-
This action cannot be undone.
234+
Are you sure you want to remove the user <strong>{user.username}</strong>?
235+
This will deactivate their account and prevent login, but preserves all data for audit purposes.
236236
</Text>
237237
</VStack>
238238

@@ -248,9 +248,9 @@ export function UserActions({
248248
colorPalette="red"
249249
onClick={handleDelete}
250250
loading={actionLoading}
251-
loadingText="Deleting..."
251+
loadingText="Removing..."
252252
>
253-
Delete User
253+
Remove User
254254
</LoadingButton>
255255
</DialogFooter>
256256
</DialogContent>

thingconnect.pulse.client/src/features/users/hooks/useUserManagement.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ export function useUserManagement(): UseUserManagementReturn {
9999
try {
100100
setActionLoading(true);
101101
setError(null);
102+
// Note: This performs a soft delete (deactivation) rather than hard delete
102103
await UserManagementService.deleteUser(id);
103104
// Refresh the users list after deletion
104105
await loadUsers();

0 commit comments

Comments
 (0)