✨(backend) manage reconciliation requests for user accounts#1708
✨(backend) manage reconciliation requests for user accounts#1708
Conversation
4d4bd60 to
ab55e01
Compare
35c4d49 to
5090839
Compare
47099e1 to
57050a1
Compare
052b0b3 to
d32ef62
Compare
|
After discussion with @AntoLC some data migration are missing. There are also relation with |
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, in a threefold process (update document acess, update invitations, update user status.)
d32ef62 to
032413a
Compare
|
Size Change: +6.14 kB (+0.15%) Total Size: 4.2 MB
|
This changes the way the reconciliation requests CSV imports are processed and requires the CSV to provide a unique id for each request. Rows with errors are also now handled better so that they don't fail the whole import.
This changes the way the reconciliation requests CSV imports are processed and requires the CSV to provide a unique id for each request. Rows with errors are also now handled better so that they don't fail the whole import.
…ocs into sbl/user-reconciliation
This removes the new email template in favor of using the already existing one, by removing the extra formating.
0d2b538 to
c65ab34
Compare
Process each reconciliation requests individually as a transaction, with the bulk updates/deletes made for each requests, to avoid interference between requests and unwanted states
Adds management of link traces and documents favorites in the reconciliation requests.
Done.
Done as well, if not needed we can put it behind a toggle controlled by an env variable. |
cb97eee to
1dc375e
Compare
Adds management of threads, comments and reactions in the reconciliation requests.
1dc375e to
b3e69ea
Compare
9784cce to
7e36d91
Compare
This adds unit tests for the new API view that is used when a confirmation link is clicked in an email.
7e36d91 to
2a8e51a
Compare
lunika
left a comment
There was a problem hiding this comment.
Few nitepicking otherwise it's good to me
| from rest_framework import filters, status, viewsets | ||
| from rest_framework import response as drf_response | ||
| from rest_framework.permissions import AllowAny | ||
| from rest_framework.response import Response |
There was a problem hiding this comment.
line 41 the drf reponse module is imported, you can probably use it instead of making an other import ?
| """Generate and send email to the user from a template.""" | ||
| emails = [self.email] | ||
| context = context or {} | ||
| domain = Site.objects.get_current().domain |
lunika
left a comment
There was a problem hiding this comment.
Didn't saw you have merge commits in your commits history.
You have to remove them
| - ✨(helm) redirecting system #1697 | ||
| - 📱(frontend) add comments for smaller device #1737 | ||
| - ✨(project) add custom js support via config #1759 | ||
| - ✨(backend) manage reconciliation requests for user accounts #1708 |
There was a problem hiding this comment.
Should be placed under "Unreleased"
Purpose
Fix #1616.
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, in a threefold process (update document acess, update invitations, update user status.)
Proposal
UserReconciliationCsvImportmodel to manage the import of reconciliation requests through a task (user_reconciliation_csv_import_job)UserReconciliationmodel to store the user reconciliation requests themselves (a row = aactive_user/inactive_userpair)process_reconciliationadmin action process the action on the requested entries, if both emails have been checked.DocumentAccessitems, while managing the case where both users have access to the document (keeping the higher role)LinkTraceitems, while managing the case where both users have link traces to the documentDocumentFavoriteitems, while managing the case where both users have put the document in their favoritesThread,CommentandReactionitems)is_activestatus on both usersUSER_RECONCILIATION_FORM_URLenv variable for the "make a new request" URL in an email.Demo page reconciliation success
In waiting for @rl-83 to provide the design:
