Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
为租户 API Key 增加按知识库的可读 / 可写 / 可管理授权,并在
GET /knowledge-bases返回permission字段,方便调用方按库判断权限。已有 Key 保持兼容:
knowledge_base_permissions为空对象{}时,白名单内每个知识库仍继承该 Key 的全局retrieve/ingest/manage_kbs。Type of Change
Related Issue
Fixes #3276
Testing
go test ./internal/types ./internal/handler ./internal/middleware ./internal/application/service ./internal/application/repository ./internal/database -count=1apiKeyScope.test.ts覆盖分库矩阵默认值permission.write=falseChecklist
docs/api/knowledge-base.md,website-docs/)git diff --check origin/main...HEADpassesgolangci-lint run --new-from-rev=origin/main ./...)Screenshots / Recordings
API 集成设置:选中知识库后的分库矩阵(可读 / 可编辑 / 可管理)。