Skip to content

spec 契约文档漂移:ISharingService.canEdit 未提 modifyAllRecords 旁路(canDelete 提了) #5125

Description

@claude

packages/spec/src/contracts/sharing-service.tsISharingService.canEdit 文档说:

Return true when the principal in context may UPDATE the record (object, recordId). Ownership (widened by write DEPTH) OR a write-level (ShareAccessLevel edit) share. Always true for system context, public objects, and objects with no owner field.

#4647(PR #5124)之后,实现还有第三条:modifyAllRecords 超级用户写旁路(在 ownership / share 之后追问 ISecurityService.hasWriteBypass)。兄弟方法 canDelete 的文档本来就把这条旁路写进去了("ownership (widened by write DEPTH) or the modifyAllRecords super-user bypass ONLY"),所以现在两个方法的契约文档一个提、一个不提,读起来像是 canEdit 故意不含旁路 —— 与实际相反。

修的是一句话:在 canEdit 的 doc comment 里补上旁路分支(措辞与 canDelete 对齐)。

单独开 issue 而不是并进 #4647 的 PR:那个 PR 的任务书明确 packages/spec/** 零改动(spec 是另一条车道),而这处只是 doc comment,没有 schema/类型变化,适合并进任意一个 spec 车道的小 PR。

发现于 #4647 / PR #5124。未认领。


Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions