WeKnora/internal/application/repository
ochan.kwon 8d8cc051be fix(tenant): prevent api_key encryption loss on tenant settings update
When a tenant setting is updated via PUT /tenants/kv/{key} (e.g.,
retrieval-config, parser-engine-config), the GORM AfterFind-decrypted
plaintext api_key was silently written back to the database because
db.Updates() does not trigger the BeforeSave hook.

Guard the repository's UpdateTenant to skip writing plaintext api_key
back to the database. Pre-encrypted values (enc:v1:… from CreateTenant
/ UpdateAPIKey) are written as-is; AfterFind-decrypted plaintext is
blanked so GORM skips the column entirely.

Closes #798
2026-03-25 21:25:21 +08:00
..
memory/neo4j feat: implement preview of user level memory graph 2026-02-25 14:29:54 +08:00
retriever fix: make Milvus vector metric type configurable via MILVUS_METRIC_TYPE 2026-03-25 21:20:49 +08:00
agent_share.go feat(api): integrate per-organization resource counts into organization listing 2026-02-09 11:40:25 +08:00
chunk.go feat(chunk): implement batch deletion for chunks to avoid MySQL placeholder limit 2026-03-19 18:20:09 +08:00
custom_agent.go refactor: 调整智能体配置,增强智能体选择与状态管理 2025-12-26 21:31:02 +08:00
kbshare.go feat(api): integrate per-organization resource counts into organization listing 2026-02-09 11:40:25 +08:00
knowledge.go feat: add organization management features 2026-02-09 11:40:25 +08:00
knowledgebase.go feat: add pinning functionality for knowledge bases 2026-03-05 18:14:14 +08:00
mcp_service.go feat: add built-in MCP service support 2026-03-05 21:57:01 +08:00
message.go feat: add clear session messages functionality 2026-03-12 21:47:12 +08:00
model.go refactor: Update function signatures across multiple files to improve readability by adding context parameters and enhancing code structure 2025-11-28 16:17:52 +08:00
organization.go feat(api): integrate per-organization resource counts into organization listing 2026-02-09 11:40:25 +08:00
session.go feat: enhance multimodal image processing and session management 2026-03-12 13:17:47 +08:00
tag.go perf: batch tag reference counting 2026-01-20 18:19:44 +08:00
tenant.go fix(tenant): prevent api_key encryption loss on tenant settings update 2026-03-25 21:25:21 +08:00
tenant_disabled_shared_agent.go feat(agent): enhance agent and skill management features 2026-02-09 11:40:25 +08:00
tenant_test.go fix(tenant): prevent api_key encryption loss on tenant settings update 2026-03-25 21:25:21 +08:00
user.go feat: add GetUserByTenantID functionality to user repository and service 2026-03-05 18:14:14 +08:00