Skip to content

✨(backend) manage reconciliation requests for user accounts#1878

Merged
Ash-Crow merged 3 commits intomainfrom
sbl-user-reconciliation
Feb 11, 2026
Merged

✨(backend) manage reconciliation requests for user accounts#1878
Ash-Crow merged 3 commits intomainfrom
sbl-user-reconciliation

Conversation

@Ash-Crow
Copy link
Collaborator

@Ash-Crow Ash-Crow commented Feb 10, 2026

For now, the reconciliation requests are imported through CSV in the Django admin, which sends confirmation email to both addresses. When both are checked, the actual reconciliation is processed, and all user-related content is updated.

Purpose

Fix #1616 // Replaces #1708

For now, the reconciliation requests are imported through CSV in the Django admin, which sends confirmation email to both addresses. When both are checked, the actual reconciliation is processed, and all user-related content is updated.

Proposal

  • New UserReconciliationCsvImport model to manage the import of reconciliation requests through a task (user_reconciliation_csv_import_job)
  • New UserReconciliation model to store the user reconciliation requests themselves (a row = a active_user/inactive_user pair)
    • On save, a confirmation email is sent to the users
  • A process_reconciliation admin action process the action on the requested entries, if both emails have been checked.
    • Bulk update the DocumentAccess items, while managing the case where both users have access to the document (keeping the higher role)
    • Bulk update the LinkTrace items, while managing the case where both users have link traces to the document
    • Bulk update the DocumentFavorite items, while managing the case where both users have put the document in their favorites
    • Bulk update the comment system items (Thread, Comment and Reaction items)
    • Bulk update the is_active status on both users
  • New USER_RECONCILIATION_FORM_URL env variable for the "make a new request" URL in an email.
  • Write unit tests
  • Remove the unused email_user() method on User, replaced with send_email() similar to the one on the Document model

Demo page reconciliation success

image

@Ash-Crow Ash-Crow force-pushed the sbl-user-reconciliation branch 4 times, most recently from 7c3cf2f to 469e4a3 Compare February 10, 2026 16:47
@github-actions
Copy link

github-actions bot commented Feb 10, 2026

Size Change: +7.49 kB (+0.18%)

Total Size: 4.2 MB

Filename Size Change
apps/impress/out/_next/static/6caa9da8/_buildManifest.js 0 B -830 B (removed) 🏆
apps/impress/out/_next/static/b9a83f48/_buildManifest.js 896 B +896 B (new file) 🆕
apps/impress/out/_next/static/chunks/3642.js 0 B -783 kB (removed) 🏆
apps/impress/out/_next/static/chunks/6605.js 780 kB +780 kB (new file) 🆕
apps/impress/out/_next/static/chunks/pages/_app.js 601 kB +5.93 kB (+1%)
apps/impress/out/_next/static/chunks/pages/user-reconciliations/active/[id].js 1.42 kB +1.42 kB (new file) 🆕
apps/impress/out/_next/static/chunks/pages/user-reconciliations/inactive/[id].js 1.42 kB +1.42 kB (new file) 🆕
apps/impress/out/user-reconciliations/active/[id]/index.html 1.23 kB +1.23 kB (new file) 🆕
apps/impress/out/user-reconciliations/inactive/[id]/index.html 1.23 kB +1.23 kB (new file) 🆕

compressed-size-action

@Ash-Crow Ash-Crow requested a review from lunika February 10, 2026 16:55
@Ash-Crow Ash-Crow marked this pull request as ready for review February 10, 2026 16:56
@rl-83
Copy link
Collaborator

rl-83 commented Feb 10, 2026

Here is my proposal !

@Ash-Crow Ash-Crow force-pushed the sbl-user-reconciliation branch from 469e4a3 to 437d11b Compare February 10, 2026 17:45
@Ash-Crow
Copy link
Collaborator Author

Here is my proposal !

Thanks!

@AntoLC can you please implement it?

@AntoLC AntoLC force-pushed the sbl-user-reconciliation branch from 437d11b to 6917be4 Compare February 11, 2026 14:08
@Ash-Crow Ash-Crow force-pushed the sbl-user-reconciliation branch 2 times, most recently from 1c76bc9 to 6917be4 Compare February 11, 2026 14:57
@AntoLC AntoLC force-pushed the sbl-user-reconciliation branch from 7b95a25 to c6490cc Compare February 11, 2026 16:24
@Ash-Crow Ash-Crow force-pushed the sbl-user-reconciliation branch from c6490cc to a992572 Compare February 11, 2026 17:24
Ash-Crow and others added 3 commits February 11, 2026 18:52
For now, the reconciliation requests are imported through CSV in the
Django admin, which sends confirmation email to both addresses.
When both are checked, the actual reconciliation is processed, and
all user-related content is updated.
Integrate the new pages for email validation
into the user reconciliation flow.
This includes creating components
for active and inactive user reconciliations,
validating email addresses, and add some
tests to ensure the functionality works as expected.
Moved all doc related to user documentation in the same file.
Fixed a copy-paste or merge error that affected other variables.
@Ash-Crow Ash-Crow force-pushed the sbl-user-reconciliation branch from a992572 to a130fcb Compare February 11, 2026 17:52
@Ash-Crow Ash-Crow enabled auto-merge (squash) February 11, 2026 17:54
@Ash-Crow Ash-Crow merged commit 3ab0a47 into main Feb 11, 2026
28 of 29 checks passed
@Ash-Crow Ash-Crow deleted the sbl-user-reconciliation branch February 11, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle users with multiple accounts

4 participants

Comments