Skip to content

BUM & LOD: Soft-deleted users should be hard-deleted when synced to LOD #13397

@nucleogenesis

Description

@nucleogenesis

This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Overview

When a learner on an LOD has been soft-deleted on the facility they were imported from, the LOD will treat that user as if they were hard-deleted.

This is because a soft-deleted user is treated as hard-deleted for all intents and purposes with the exception of being able to be temporarily un-deletable on the origin Facility.

If a user has been soft-deleted on a Facility and that user is synced to the LOD, a subsequent un-deletion would simply re-sync that user to the LOD.

Technical requirements

  • When a user is synced to a Learn-Only Device, check if their deletion_date is NULL and if it isn't, then delete that user from the LOD using the deleteimporteduser API introduced in Manage users in LOD #12228
  • Be sure to test a user who is soft-deleted, then synced to and deleted from an LOD, and then un-deleted on the Facility. They should be able to be imported once more to the LOD without issue.

Acceptance criteria

  • Add test cases to cover where you handle this to cover cases of syncing no deleted users, some deleted users, all deleted users.

Metadata

Metadata

Assignees

Labels

APP: DeviceRe: Device App (content import/export, facility-syncing, user permissions, etc.)DEV: backendPython, databases, networking, filesystem...P0 - criticalPriority: Release blocker or regression

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions