RFE: Support Crate Ownership
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- python
- 领域
- api, authorization, backend, database
调研方向
Start with the proposed CrateOwnership model and CargoPublishApiView.put(), then review the three Cargo owner endpoints and the yank authorization path. Done means ownership is scoped per distribution, first publishers are assigned automatically, owners can manage owners, and publish/yank permissions follow the stated rules while unauthenticated ownership mode remains supported.
由索引模型根据 Issue 内容生成。
描述
Consider supporting Crate ownership like crates.io -- users would be able to publish or modify only crates which they have maintainership over.
This is more of a long-term plan and should probably be optional. The "if you can auth, you can push" mode ought to continue being supported.
Crate Ownership
Goal: Track who owns which crate names, and only allow owners to publish new versions or yank. Deferred — any authenticated user with distribution-level permission can publish any crate name for now.
a. CrateOwnership model
class CrateOwnership(BaseModel):
distribution = models.ForeignKey(RustDistribution, on_delete=models.CASCADE)
crate_name = models.CharField(max_length=255)
user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
class Meta:
unique_together = ("distribution", "crate_name", "user")
- Scoped per-distribution (different registries can have different owners for the same crate name)
- First publisher of a crate name automatically becomes owner
- Owners can add/remove other owners
b. Ownership endpoints
Implement the Cargo owner API:
GET /api/v1/crates/{name}/owners— list ownersPUT /api/v1/crates/{name}/owners— add owner (body:{"users": ["username"]})DELETE /api/v1/crates/{name}/owners— remove owner
c. Publish authorization check
In CargoPublishApiView.put():
- If the crate name has no owners yet → allow (auto-assign publisher as owner)
- If the crate name has owners → only allow if
request.useris an owner
d. Yank authorization check
Only crate owners (or distribution admins) can yank/unyank.
- 主要语言
- Python
- 星标
- 1
- 派生
- 5
- 平均合并
- 5 天 4 小时
- 30 天内合并 PR
- 3
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pulp/pulp_rust 的其他 Issue
-
RFE: Support Token Scoping可能重新可做 @aKlimau 于 32 天前认领,目前没有进行中的 PR。 未关闭Feature Triage-Needed
-
Feature Triage-Needed
难度 5/5 一周以上 新手友好度 35/100
-
Feature Triage-Needed
难度 2/5 1-3 小时 新手友好度 52/100
相似的 Issue
-
comp/cli P3 type/security
难度 2/5 1-3 小时 新手友好度 68/100
NousResearch/hermes-agent#141420 · 1 条评论 ·
维护者通常 1 天内回复
-
vendor-pitch
难度 2/5 1-3 小时 新手友好度 87/100
维护者通常 1 天内回复
-
bug llm p2
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
New tool: ZIPZAX Python Notebook Studio可能已有人在做 @github-actions 今天认领。 未关闭submission triage
难度 1/5 1 小时以内 新手友好度 68/100
kausalflow/tools#226 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100