feat(knowledge_base): wire client_specific company scoping write path #260
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/pms-341-kb-company-ids"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
KB articles could be marked client_specific but company_ids was unsettable at every layer, so the portal read filter ($company = ANY(company_ids)) matched no one and such articles were invisible to all clients.
Add company_ids to CreateKbArticleRequest / UpdateKbArticleRequest and bind it in the insert/update. A client_specific article now requires a non-empty company_ids (422 otherwise); every id is validated as a company owned by the caller's tenant (400 otherwise); any non-client_specific visibility clears the scope so a downgraded article cannot stay portal-visible. KbArticleResponse and the article SELECTs now carry company_ids so the editor can round-trip the selection.
#PMS-341