fix: add wiki:node:update to wiki domain scopes#157
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0278715eea
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| // wiki shortcuts: +node-create, +move-docs-to-wiki, +update | ||
| "wiki": { | ||
| "wiki:node:create", "wiki:node:read", "wiki:space:read", | ||
| "wiki:node:create", "wiki:node:read", "wiki:node:update", "wiki:space:read", |
There was a problem hiding this comment.
Use the logged-in token for wiki update
Adding wiki:node:update here makes auth login --domain wiki --recommend request the scope, but the documented feishu-cli wiki update ... flow still doesn't use the token saved by that login: cmd/update_wiki_node.go calls resolveOptionalUserToken, and cmd/utils.go documents that this helper only checks --user-access-token/FEISHU_USER_ACCESS_TOKEN and ignores token.json. In environments where the bot/app token lacks wiki update permission, users will still hit 99991679 after logging in unless they manually pass/export the token, so this scope addition is not sufficient for the failing scenario.
Useful? React with 👍 / 👎.
问题
wiki:node:update未被收录进 wiki domain 的 scope 列表auth login --domain wiki无法获取该权限wiki update命令因99991679 Unauthorized报错auth login --scope "wiki:node:update"才能使用修复
在
internal/registry/domain_alias.go的extraDomainScopes["wiki"]列表中添加"wiki:node:update"。