fix(security): harden agent share listing and align full-access API key routes

Enforce tenant ownership in ListSharesByAgent so full-access API keys cannot enumerate cross-tenant shares, and allow full-access keys to create KBs and manage share routes consistently with other tenant-wide operations.
This commit is contained in:
wizardchen
2026-07-13 16:55:35 +08:00
committed by lyingbug
parent 1dfa23d728
commit 50b8c0a72e
7 changed files with 90 additions and 25 deletions
+1 -1
View File
@@ -123,7 +123,7 @@ func (s *stubAgentShareForGuard) ShareAgent(context.Context, string, string, str
func (s *stubAgentShareForGuard) RemoveShare(context.Context, string, string, uint64) error {
panic("not implemented")
}
func (s *stubAgentShareForGuard) ListSharesByAgent(context.Context, string) ([]*types.AgentShare, error) {
func (s *stubAgentShareForGuard) ListSharesByAgent(context.Context, string, uint64) ([]*types.AgentShare, error) {
panic("not implemented")
}
func (s *stubAgentShareForGuard) ListSharesByOrganization(context.Context, string) ([]*types.AgentShare, error) {