@@ -36,8 +36,9 @@ to act on.
3636The user will be able to choose one or more endpoint scopes. This RFC proposes
3737adding the following endpoint scopes:
3838
39- * ** publish** : allows uploading new crates or new versions of existing crates
40- the user owns
39+ * ** publish-new** : allows publishing new crates
40+ * ** publish-update** : allows publishing a new version for existing crates the
41+ user owns
4142* ** yank** : allows yanking and unyanking existing versions of the user's crates
4243* ** change-owners** : allows inviting new owners or removing existing owners
4344
@@ -50,9 +51,9 @@ access to all (documented and undocumented) crates.io API endpoints except for
5051adding new tokens.
5152
5253The crates.io UI will pre-select the scopes needed by the ` cargo ` CLI, which at
53- the time of writing this RFC are ` publish ` , ` yank ` and ` change-owners ` . The
54- user will have to explicitly opt into extra scopes or the legacy permission
55- model.
54+ the time of writing this RFC are ` publish-new ` , ` publish-update ` , ` yank ` and
55+ ` change-owners ` . The user will have to explicitly opt into extra scopes or the
56+ legacy permission model.
5657
5758Tokens created before the implementation of this RFC will use the legacy
5859permission model.
@@ -94,8 +95,9 @@ registries.
9495The scopes proposed by this RFC allow access to the following endpoints:
9596
9697| Endpoint | Required scope |
97- | --- | --- |
98- | ` PUT /crates/new ` | ** publish** |
98+ | --- | --- | --- |
99+ | ` PUT /crates/new ` (new crates) | ** publish-new** |
100+ | ` PUT /crates/new ` (existing crates) | ** publish-update** |
99101| ` DELETE /crates/:crate_id/:version/yank ` | ** yank** |
100102| ` PUT /crates/:crate_id/:version/unyank ` | ** yank** |
101103| ` PUT /crates/:crate_id/owners ` | ** change-owners** |
@@ -200,8 +202,6 @@ scoping:
200202# Unresolved questions
201203[ unresolved-questions ] : #unresolved-questions
202204
203- * Should there be separate scopes for publishing a new crate and a version of
204- an existing crate, instead of the single ` publish ` scope?
205205* Are there more scopes that would be useful to implement from the start?
206206* Should crate scopes be allowed on tokens with the legacy endpoint scope?
207207* Is the current behavior of crate scopes on endpoints that don't interact with
0 commit comments