feat(kbshare): enhance knowledge base share listing with tenant ownership

This commit is contained in:
wizardchen
2026-02-06 17:54:40 +08:00
committed by lyingbug
parent f065b1df45
commit 4f44c12c41
3 changed files with 25 additions and 4 deletions
+2 -1
View File
@@ -86,7 +86,8 @@ type KBShareService interface {
RemoveShare(ctx context.Context, shareID string, userID string) error
// Query
ListSharesByKnowledgeBase(ctx context.Context, kbID string) ([]*types.KnowledgeBaseShare, error)
// ListSharesByKnowledgeBase lists shares for a KB; tenantID must own the KB (authz check).
ListSharesByKnowledgeBase(ctx context.Context, kbID string, tenantID uint64) ([]*types.KnowledgeBaseShare, error)
ListSharesByOrganization(ctx context.Context, orgID string) ([]*types.KnowledgeBaseShare, error)
ListSharedKnowledgeBases(ctx context.Context, userID string, currentTenantID uint64) ([]*types.SharedKnowledgeBaseInfo, error)
GetShare(ctx context.Context, shareID string) (*types.KnowledgeBaseShare, error)