@@ -36,8 +36,9 @@ to act on.
36
36
The user will be able to choose one or more endpoint scopes. This RFC proposes
37
37
adding the following endpoint scopes:
38
38
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
41
42
* ** yank** : allows yanking and unyanking existing versions of the user's crates
42
43
* ** change-owners** : allows inviting new owners or removing existing owners
43
44
@@ -50,9 +51,9 @@ access to all (documented and undocumented) crates.io API endpoints except for
50
51
adding new tokens.
51
52
52
53
The 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.
56
57
57
58
Tokens created before the implementation of this RFC will use the legacy
58
59
permission model.
@@ -95,7 +96,8 @@ The scopes proposed by this RFC allow access to the following endpoints:
95
96
96
97
| Endpoint | Required scope |
97
98
| --- | --- |
98
- | ` PUT /crates/new ` | ** publish** |
99
+ | ` PUT /crates/new ` (new crates) | ** publish-new** |
100
+ | ` PUT /crates/new ` (existing crates) | ** publish-update** |
99
101
| ` DELETE /crates/:crate_id/:version/yank ` | ** yank** |
100
102
| ` PUT /crates/:crate_id/:version/unyank ` | ** yank** |
101
103
| ` PUT /crates/:crate_id/owners ` | ** change-owners** |
@@ -200,8 +202,6 @@ scoping:
200
202
# Unresolved questions
201
203
[ unresolved-questions ] : #unresolved-questions
202
204
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?
205
205
* Are there more scopes that would be useful to implement from the start?
206
206
* Should crate scopes be allowed on tokens with the legacy endpoint scope?
207
207
* Is the current behavior of crate scopes on endpoints that don't interact with
0 commit comments