diff --git a/management/server/user.go b/management/server/user.go index 8af8b01bd..0e4c12042 100644 --- a/management/server/user.go +++ b/management/server/user.go @@ -565,6 +565,14 @@ func (am *DefaultAccountManager) SaveUser(accountID, initiatorUserID string, upd } defer func() { + if oldUser.IsBlocked() != update.IsBlocked() { + if update.IsBlocked() { + am.storeEvent(initiatorUserID, oldUser.Id, accountID, activity.UserBlocked, nil) + } else { + am.storeEvent(initiatorUserID, oldUser.Id, accountID, activity.UserUnblocked, nil) + } + } + // store activity logs if oldUser.Role != newUser.Role { am.storeEvent(initiatorUserID, oldUser.Id, accountID, activity.UserRoleUpdated, map[string]any{"role": newUser.Role})