Skip to content

fix: add wiki:node:update to wiki domain scopes#157

Open
DilemmaVi wants to merge 1 commit into
riba2534:mainfrom
DilemmaVi:fix/wiki-node-update-scope
Open

fix: add wiki:node:update to wiki domain scopes#157
DilemmaVi wants to merge 1 commit into
riba2534:mainfrom
DilemmaVi:fix/wiki-node-update-scope

Conversation

@DilemmaVi
Copy link
Copy Markdown

问题

  • wiki:node:update 未被收录进 wiki domain 的 scope 列表
  • 导致 auth login --domain wiki 无法获取该权限
  • 使得 wiki update 命令因 99991679 Unauthorized 报错
  • 用户需要手动 auth login --scope "wiki:node:update" 才能使用

修复

internal/registry/domain_alias.goextraDomainScopes["wiki"] 列表中添加 "wiki:node:update"

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant