This is an automated email from the ASF dual-hosted git repository.

lahirujayathilake pushed a commit to branch access-integration-v3
in repository https://gitbox.apache.org/repos/asf/airavata-custos.git

commit e8681c21dca01d336bbf4823b8b89d48e68b7acc
Author: lahiruj <[email protected]>
AuthorDate: Thu May 21 03:17:16 2026 -0400

    Soft delete users on request_user_modify type delete, instead of hard delete
---
 connectors/ACCESS/AMIE-Processor/handler/request_user_modify.go | 6 +++---
 pkg/models/project.go                                           | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/connectors/ACCESS/AMIE-Processor/handler/request_user_modify.go 
b/connectors/ACCESS/AMIE-Processor/handler/request_user_modify.go
index b72031b22..a2fe2fe68 100644
--- a/connectors/ACCESS/AMIE-Processor/handler/request_user_modify.go
+++ b/connectors/ACCESS/AMIE-Processor/handler/request_user_modify.go
@@ -73,10 +73,10 @@ func (h *RequestUserModifyHandler) Handle(ctx 
context.Context, tx *sql.Tx, packe
                }
        case strings.EqualFold(actionType, "delete"):
                if user != nil {
-                       if err := h.svc.DeleteUser(ctx, user.ID); err != nil {
-                               return fmt.Errorf("request_user_modify: delete 
user: %w", err)
+                       if _, err := h.svc.UpdateUserStatus(ctx, user.ID, 
models.UserRemoved); err != nil {
+                               return fmt.Errorf("request_user_modify: 
soft-remove user: %w", err)
                        }
-                       if err := h.auditSvc.Log(ctx, tx, packet.ID, eventID, 
model.AuditDeletePerson, "user", user.ID, ""); err != nil {
+                       if err := h.auditSvc.Log(ctx, tx, packet.ID, eventID, 
model.AuditDeletePerson, "user", user.ID, "status=REMOVED"); err != nil {
                                return fmt.Errorf("request_user_modify: audit 
DELETE_PERSON: %w", err)
                        }
                }
diff --git a/pkg/models/project.go b/pkg/models/project.go
index 38de362a0..8d0d5720b 100644
--- a/pkg/models/project.go
+++ b/pkg/models/project.go
@@ -10,6 +10,7 @@ const (
        UserInactive  UserStatus = "INACTIVE"
        UserSuspended UserStatus = "SUSPENDED"
        UserMerged    UserStatus = "MERGED"
+       UserRemoved   UserStatus = "REMOVED"
 )
 
 // ProjectStatus enumerates the lifecycle states a Project may occupy.

Reply via email to