Go: add context, part12 (#17435)

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-07-27 19:30:41 +08:00
committed by GitHub
parent 5bfd59f894
commit f73f4cb720
36 changed files with 209 additions and 150 deletions

View File

@@ -142,7 +142,7 @@ func (s *File2DocumentService) LinkToDatasets(ctx context.Context, userID string
// ── 5. Validate KB permissions ────────────────────────────────────────────
for _, kb := range kbMap {
if !service.HasKBTeamPermission(kb, userID, dao.NewTenantDAO()) {
if !service.HasKBTeamPermission(ctx, kb, userID, dao.NewTenantDAO()) {
return ErrLinkNoAuthorization
}
}