fb947205b7
FAQ entries (CRUD on /knowledge-bases/:id/faq/entries) and KB tags (/knowledge-bases/:id/tags) were gated to plain Contributor+, while the KB main routes plus chunks/wiki sub-resources require OwnedKBOrAdmin (creator OR Admin+). The mismatch let any Contributor mutate FAQ entries and tags inside someone else's KB even though they could not edit the KB's other content. Both are KB child resources by design: FAQ entries are the body of FAQ-type KBs, and tags categorise KB content. Touching them affects the KB owner's organisation of their KB, so they belong on the same matrix as chunks and wiki pages — Contributor with KB ownership can manage their own, others need Admin+. Sweep checked router gates and handler/service tenant scoping for the rest of the surface (Models / MCP / WebSearchProvider / VectorStore / DataSource / WeKnoraCloud / IM channels). All Admin+ routes correctly load tenant_id from context, and per-id mutating service calls go through (id, tenantID) primary keys, so a Viewer cannot reach those even with a guessed cross-tenant id.