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

Require owner approval #1108

Merged
merged 20 commits into from
Oct 6, 2017
Merged

Conversation

natboehm
Copy link
Contributor

@natboehm natboehm commented Oct 5, 2017

This PR addresses issue #924, adding owners with their consent, deployable chunk 4. It implements the Crates functionality necessary for Cargo to invite a user to be an owner instead of automatically adding any user to be an owner of any crate. These changes correlate with the Cargo changes made in this PR. Function owner_add now creates an owner invitation instead of adding a user to be an owner, and returns a boolean okay value with a String message indicating that the user was invited to be an owner of the crate. This boolean okay value is not explicitly used for anything but is necessary to support older versions of Cargo, without which older versions will fail to decode only a String response.

replicates what was previously done in
the owner_add function of krate.rs,
adding an upsert. looks like owners are
never really removed, deleted field is
just toggled.
…hen successful, change query upsert an owner invitation instead of inserting a crate_owner
modify publish message to describe error of publishing to
a crate that you don't own with reference to invites
…_email_table and test_insert_into_email_table_with_change
…such that the owner invitation is accepted and user is added as an owner to the crate
…ation is accepted for the user to be added as an owner
@sgrif
Copy link
Contributor

sgrif commented Oct 6, 2017

I think you need to update your rustfmt version

@carols10cents
Copy link
Member

Yeah sorry about that @natboehm -- we updated rustfmt the other day. I wish there was a better way to notify each other when we do that... I have it set up locally so I just pushed a commit with rustfmt run with the newer version, let's see how that goes :)

@carols10cents
Copy link
Member

I also just resolved the merge conflict since it was due to that PR of mine that I mentioned wednesday, oops!

@sgrif sgrif mentioned this pull request Oct 6, 2017
@natboehm
Copy link
Contributor Author

natboehm commented Oct 6, 2017

Okay, it's fine, thanks for resolving all of that!

@carols10cents
Copy link
Member

Tested this out locally and it works great!! Thank you!! ❤️ ❤️ ❤️ ❤️ ❤️

bors: r+

bors-voyager bot added a commit that referenced this pull request Oct 6, 2017
1108: Require owner approval r=carols10cents

This PR addresses issue #924, adding owners with their consent, deployable chunk 4. It implements the Crates functionality necessary for Cargo to invite a user to be an owner instead of automatically adding any user to be an owner of any crate. These changes correlate with the Cargo changes made in [this PR](rust-lang/cargo#4551). Function `owner_add` now creates an owner invitation instead of adding a user to be an owner, and returns a `boolean` okay value with a `String` message indicating that the user was invited to be an owner of the crate. This `boolean` okay value is not explicitly used for anything but is necessary to support older versions of Cargo, without which older versions will fail to decode only a `String` response.
@bors-voyager
Copy link
Contributor

bors-voyager bot commented Oct 6, 2017

Build succeeded

@bors-voyager bors-voyager bot merged commit 0264e76 into rust-lang:master Oct 6, 2017
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.

3 participants