Skip to content

Commit

Permalink
Auto merge of #6604 - dwijnand:owner-add-invites, r=ehuss
Browse files Browse the repository at this point in the history
Document that owner --add now just invites

Fixes #4599
  • Loading branch information
bors committed Jan 27, 2019
2 parents 2458180 + 5970385 commit a25acdb
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/owner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub fn cli() -> App {
subcommand("owner")
.about("Manage the owners of a crate on the registry")
.arg(Arg::with_name("crate"))
.arg(multi_opt("add", "LOGIN", "Name of a user or team to add as an owner").short("a"))
.arg(multi_opt("add", "LOGIN", "Name of a user or team to invite as an owner").short("a"))
.arg(
multi_opt(
"remove",
Expand Down
4 changes: 2 additions & 2 deletions src/doc/man/cargo-owner.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ information about owners and publishing.

*-a*::
*--add* _LOGIN_...::
Add the given user or team as an owner.
Invite the given user or team as an owner.

*-r*::
*--remove* _LOGIN_...::
Expand Down Expand Up @@ -68,7 +68,7 @@ include::section-exit-status.adoc[]

cargo owner --list foo

. Add an owner to a package:
. Invite an owner to a package:

cargo owner --add username foo

Expand Down
4 changes: 2 additions & 2 deletions src/doc/man/generated/cargo-owner.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ <h3 id="cargo_owner_owner_options">Owner Options</h3>
<dt class="hdlist1"><strong>-a</strong></dt>
<dt class="hdlist1"><strong>--add</strong> <em>LOGIN</em>&#8230;&#8203;</dt>
<dd>
<p>Add the given user or team as an owner.</p>
<p>Invite the given user or team as an owner.</p>
</dd>
<dt class="hdlist1"><strong>-r</strong></dt>
<dt class="hdlist1"><strong>--remove</strong> <em>LOGIN</em>&#8230;&#8203;</dt>
Expand Down Expand Up @@ -176,7 +176,7 @@ <h2 id="cargo_owner_examples">EXAMPLES</h2>
</div>
</li>
<li>
<p>Add an owner to a package:</p>
<p>Invite an owner to a package:</p>
<div class="literalblock">
<div class="content">
<pre>cargo owner --add username foo</pre>
Expand Down
6 changes: 3 additions & 3 deletions src/doc/src/reference/publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,21 +151,21 @@ $ cargo owner --remove github:rust-lang:owners

The owner IDs given to these commands must be GitHub user names or GitHub teams.

If a user name is given to `--add`, that user becomes a “named” owner, with
If a user name is given to `--add`, that user is invited as a “named” owner, with
full rights to the crate. In addition to being able to publish or yank versions
of the crate, they have the ability to add or remove owners, *including* the
owner that made *them* an owner. Needless to say, you shouldn’t make people you
don’t fully trust into a named owner. In order to become a named owner, a user
must have logged into [crates.io] previously.

If a team name is given to `--add`, that team becomes a “team” owner, with
If a team name is given to `--add`, that team is invited as a “team” owner, with
restricted right to the crate. While they have permission to publish or yank
versions of the crate, they *do not* have the ability to add or remove owners.
In addition to being more convenient for managing groups of owners, teams are
just a bit more secure against owners becoming malicious.

The syntax for teams is currently `github:org:team` (see examples above).
In order to add a team as an owner one must be a member of that team. No
In order to invite a team as an owner one must be a member of that team. No
such restriction applies to removing a team as an owner.

### GitHub permissions
Expand Down
4 changes: 2 additions & 2 deletions src/etc/man/cargo-owner.1
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ information about owners and publishing.
.sp
\fB\-a\fP, \fB\-\-add\fP \fILOGIN\fP...
.RS 4
Add the given user or team as an owner.
Invite the given user or team as an owner.
.RE
.sp
\fB\-r\fP, \fB\-\-remove\fP \fILOGIN\fP...
Expand Down Expand Up @@ -199,7 +199,7 @@ cargo owner \-\-list foo
. sp -1
. IP " 2." 4.2
.\}
Add an owner to a package:
Invite an owner to a package:
.sp
.if n .RS 4
.nf
Expand Down

0 comments on commit a25acdb

Please sign in to comment.