模糊名称搜索可能导致共享错误的同名文档
原文依据:2 处查找步骤使用 `name contains 'Project Brief'`,可能返回多个名称包含该片段的文档,但后续步骤没有规定如何确认应使用哪个 `DOC_ID`。
如果代理从多个结果中选错文档,错误文档会被授予编辑权限,并且其链接会发送给收件人。
查找命令使用包含匹配,而不是唯一 ID 或精确名称;若多个 Google 文档名称含有“Project Brief”,该步骤可能返回多个结果。后续权限命令只要求填入一个 DOC_ID,却没有可见的选择或确认规则,因此执行者可能共享错误文档。用户可要求按唯一 ID、所有者或位置筛选,并在授权前显示标题和所有者供确认。
1. Find the doc: `gws drive files list --params '{"q": "name contains '\''Project Brief'\'' and mimeType = '\''application/vnd.google-apps.document'\''"}'`2. Share with editor access: `gws drive permissions create --params '{"fileId": "DOC_ID"}' --json '{"role": "writer", "type": "user", "emailAddress": "reviewer@company.com"}'`3. Email the link: `gws gmail +send --to reviewer@company.com --subject 'Please review: Project Brief' --body 'I have shared the project brief with you: https://docs.google.com/document/d/DOC_ID'`查看另外 1 个位置
1. Find the doc: `gws drive files list --params '{"q": "name contains '\''Project Brief'\'' and mimeType = '\''application/vnd.google-apps.document'\''"}'`2. Share with editor access: `gws drive permissions create --params '{"fileId": "DOC_ID"}' --json '{"role": "writer", "type": "user", "emailAddress": "reviewer@company.com"}'`3. Email the link: `gws gmail +send --to reviewer@company.com --subject 'Please review: Project Brief' --body 'I have shared the project brief with you: https://docs.google.com/document/d/DOC_ID'`