SUBMISSION-87: Simplify proxy handling to better match legacy.#39
Draft
DavidLFielding wants to merge 13 commits intodevelopfrom
Draft
SUBMISSION-87: Simplify proxy handling to better match legacy.#39DavidLFielding wants to merge 13 commits intodevelopfrom
DavidLFielding wants to merge 13 commits intodevelopfrom
Conversation
…on. [SUBMISSION-87] David
…vent. [SUBMISSION-87] David
… class. [SUBMISSION-87] David
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR backs off some of the changes I made in an attempt to separate proxy information from creator(submitter) information. The issue I had was that the Creator object initially stores the submitter's authoritative information, but Creator may later be updated by the submitter (with proxy permissions) by entering an unverified name and email via the Verify User page. These values simply overwrite submitter_name and submitter_email, which live on in Creator. Trying to break the Proxy concept out from Creator became impossible without something like event sourcing to fill in the deficiencies of the legacy database. The technical debt from legacy lives on for another day!
This PR works in terms of mapping the Creator fields (user_id, name, email) to the submitter fields in the legacy DB (submitter_id, submitter_name, submitter_email). The important thing to remember is that Creator may not represent the Creator of the submission in its entirety. The submitter_id it preserved. The submitter_name and submitter_email may be that of the proxied entity (not submitter_id) when a submitter is proxying for someone else. The creator object is closer to creator and contact with submitter identity(user_id) plus contact information (name, email), where only the user_id is immutable and the name/email may be updated by the submitter.
A few more things to clean up...remove owner (currently useless - identical to creator, to_submission sets both owner and creator to submitter User.