Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record verified email, if present, of the publisher in the version record #1621

Merged
merged 20 commits into from
Feb 22, 2019

Conversation

carols10cents
Copy link
Member

Connects to #1620. We can start recording emails if we have them, even though we're not requiring verified emails yet.

This builds on top of #1561.

Andy-Bell and others added 18 commits November 24, 2018 22:17
field to the versions table. Also updates the
schema.rb to reflect this table change.

published by is a foreign key referencing the
users table.
match the Version Struct correctly. Fixes test in
the same file broken by this change
creation of the new versions in the krate
publish controller and in the update-downloads
bin
by adding in user_id arguments to pass it through.
Unsure if this is the best way to solve this issue
in the tests.
published by is a nullable field now.
be part of their own builders.rs file and this PR
accidentally merged them back into the all.rs file
when trying to resolve the merge conflict. This
commit removes them from all.rs so that it reflects
master, and then makes the minimal changes needed to
the models in builders.rs to reflect the new database
updates.
And use it in places where there's only one version
@sgrif
Copy link
Contributor

sgrif commented Feb 12, 2019

Since we virtually never want this column outside of storing it for auditing purposes, does it make sense to store it in another table instead of as a column on versions?

@carols10cents
Copy link
Member Author

Great idea! That would certainly get rid of the complexity from working around diesel-rs/diesel#1979.

Do the changes from #1561 look ok? Would you rather merge that one and then this one, or only merge this one?

…isher

The publisher's email address is deliberatel copied into this table rather
than referencing the users table. If people delete their account, remove
their email, etc we still have a way to attempt to contact the publisher
of a particular version in the event of a DMCA complaint.
If there is one, because we're still in the optional stage, but we can
start recording them now if possible.
@sgrif
Copy link
Contributor

sgrif commented Feb 13, 2019

#1561 looks fine overall. I'd probably opt to do a second query to load the publishers, but we can always make those changes later. I have no strong feelings on which we merge first, but I'd probably like to deploy at least once before merging either since we have a lot of code already in master for the next deploy.

@carols10cents
Copy link
Member Author

Ok, if both this and #1561 look fine, I'd recommend merging this one, which I think we're ready to do because you deployed today. I'll let you approve though, going to close #1561.

@jtgeibel
Copy link
Member

This looks good to me. I've also tested in staging and confirmed that the publishing information is provided in the API and that the verified email address is recorded in the database (but not exposed publicly).

Thanks @Andy-Bell and @carols10cents for your work on this.

@bors r+

@bors
Copy link
Contributor

bors commented Feb 22, 2019

📌 Commit 8935dcd has been approved by jtgeibel

@bors
Copy link
Contributor

bors commented Feb 22, 2019

⌛ Testing commit 8935dcd with merge 3e3bd3d...

bors added a commit that referenced this pull request Feb 22, 2019
Record verified email, if present, of the publisher in the version record

Connects to #1620. We can start recording emails if we have them, even though we're not requiring verified emails yet.

This builds on top of #1561.
@bors
Copy link
Contributor

bors commented Feb 22, 2019

⌛ Testing commit 8935dcd with merge 6fa8ad3...

bors added a commit that referenced this pull request Feb 22, 2019
Record verified email, if present, of the publisher in the version record

Connects to #1620. We can start recording emails if we have them, even though we're not requiring verified emails yet.

This builds on top of #1561.
@bors
Copy link
Contributor

bors commented Feb 22, 2019

☀️ Test successful - checks-travis
Approved by: jtgeibel
Pushing 6fa8ad3 to master...

@bors bors merged commit 8935dcd into rust-lang:master Feb 22, 2019
@carols10cents carols10cents deleted the record-verified-email branch February 22, 2019 12:31
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.

5 participants